[Asterisk-code-review] loader: Add support for built-in modules. (asterisk[master])

Richard Mudgett asteriskteam at digium.com
Wed Jan 17 17:35:22 CST 2018


Richard Mudgett has posted comments on this change. ( https://gerrit.asterisk.org/7988 )

Change subject: loader: Add support for built-in modules.
......................................................................


Patch Set 2: Code-Review-1

(4 comments)

Why is this built-in module stuff even needed?  Core built-in modules are always available.

https://gerrit.asterisk.org/#/c/7988/2/main/loader.c
File main/loader.c:

https://gerrit.asterisk.org/#/c/7988/2/main/loader.c@115
PS2, Line 115: /* Built-in module registrations need special handling at startup*/
s/startup*\//startup *\//

i.e. insert space before comment close.


https://gerrit.asterisk.org/#/c/7988/2/main/loader.c@414
PS2, Line 414: /*
             :  * module_list is cleared by its constructor possibly after
             :  * we start accumulating built-in modules, so we need to
             :  * use another list (without the lock) to accumulate them.
             :  */
             : static struct module_list builtin_module_list;
Move this just after module_list's declaration.  The comment makes more sense when in closer proximity to module_list; especially the reference to the module_list having a lock.


https://gerrit.asterisk.org/#/c/7988/2/main/loader.c@467
PS2, Line 467: 		strcpy(mod->resource, info->name);
Append: /* safe */


https://gerrit.asterisk.org/#/c/7988/2/main/loader.c@468
PS2, Line 468: 		AST_DLLIST_INSERT_TAIL(&builtin_module_list, mod, entry);
             : 		mod->info = info;
             : 		mod->flags.builtin = 1;
For consistency and maybe sanity we should finish initializing mod before we stick it into the list.



-- 
To view, visit https://gerrit.asterisk.org/7988
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I920852bc17513a9c2627061a4ad40511e3a20499
Gerrit-Change-Number: 7988
Gerrit-PatchSet: 2
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Comment-Date: Wed, 17 Jan 2018 23:35:22 +0000
Gerrit-HasComments: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180117/93a2b67d/attachment-0001.html>


More information about the asterisk-code-review mailing list