[Asterisk-code-review] Remove redundant module references. (asterisk[master])

Corey Farrell asteriskteam at digium.com
Thu Jan 18 08:27:18 CST 2018


Corey Farrell has posted comments on this change. ( https://gerrit.asterisk.org/7989 )

Change subject: Remove redundant module references.
......................................................................


Patch Set 3:

(2 comments)

> (8 comments)
 > 
 > * include/asterisk/ari.h: The CHECK_ARI_MODULE_LOADED() is not
 > needed
 > anymore.  Dependent modules won't start if a dependency is not
 > running/declined anymore right?


ARI modules do not use optional_modules to express the dependency so that is correct.  So the macro and all calls are no longer needed.


 > * Users of ast_module_check() need to be examined for continued
 > need.
 > Many are now redundant.  CHECK_ARI_MODULE_LOADED() and
 > CHECK_PJSIP_MODULE_LOADED() are examples.


I'm expanding this patch to include redundant calls to ast_module_check so now that function is only used at the request of func_module, AMI or ARI users.


 > * Consumers of optional API's need to list the optional module in
 > the
 > AST_MODULE_INFO section.  Many currently don't do this.


I'm auditing all includes of asterisk/optional_api.h and post what I find as a separate patch.

https://gerrit.asterisk.org/#/c/7989/2/res/res_agi.c
File res/res_agi.c:

https://gerrit.asterisk.org/#/c/7989/2/res/res_agi.c@4641
PS2, Line 4641: 	if (ast_agi_register(NULL, &noop_command) == 0) {
> Revert.  While executing the command we need to ref the module or the comma
Sigh.. always embarrassed when one of my patches break another and I miss it.


https://gerrit.asterisk.org/#/c/7989/2/res/res_pjsip_config_wizard.c
File res/res_pjsip_config_wizard.c:

https://gerrit.asterisk.org/#/c/7989/2/res/res_pjsip_config_wizard.c@1215
PS2, Line 1215: static void instance_destroying_observer(const char *name, struct ast_sorcery *sorcery)
> (Pre-existing) This function should protect from the case where it is manua
I'm not sure what to do about this, but since it's a pre-existing issue it should be addressed in all branches?  Either way I'm reverting changes to this file and calling this out of scope.



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

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I332a6e8383d4c72c8e89d988a184ab8320c4872e
Gerrit-Change-Number: 7989
Gerrit-PatchSet: 3
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Comment-Date: Thu, 18 Jan 2018 14:27:18 +0000
Gerrit-HasComments: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180118/3755f895/attachment.html>


More information about the asterisk-code-review mailing list