[Asterisk-code-review] chan sip.c: Validation on module reload (asterisk[master])
Richard Mudgett
asteriskteam at digium.com
Sun Aug 23 16:17:53 CDT 2015
Richard Mudgett has posted comments on this change.
Change subject: chan_sip.c: Validation on module reload
......................................................................
Patch Set 1: Code-Review-1
(2 comments)
https://gerrit.asterisk.org/#/c/1126/1//COMMIT_MSG
Commit Message:
Line 9: Change validation on reload module because now used the cli function for
: reload. Used defined values for return AST_MODULE_LOAD_SUCCESS and
: AST_MODULE_LOAD_DECLINE instance of 0 and 1.
:
: This problem is dectected on reload by PUT method on ARI, getting always
: 404 http code when the module is reloaded.
This description should be updated to reflect the other finding.
https://gerrit.asterisk.org/#/c/1126/1/channels/chan_sip.c
File channels/chan_sip.c:
Line 33156: if (sip_reload(0, 0, NULL) == CLI_SUCCESS) {
: return AST_MODULE_LOAD_SUCCESS;
: }
: return AST_MODULE_LOAD_DECLINE;
This should just become:
sip_reload(0, 0, NULL);
return AST_MODULE_LOAD_SUCCESS;
If you look at the definition of CLI_SUCCESS there is no diffference between that and NULL. Then look at what can be returned by sip_reload(). sip_reload() can never "fail" because it can never return anything but NULL since CLI_SUCCESS is the same thing as NULL.
--
To view, visit https://gerrit.asterisk.org/1126
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I41215877fb2cfc589e0d4d464000cf6825f4d7fb
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Rodrigo Ramirez Norambuena <a at rodrigoramirez.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-HasComments: Yes
More information about the asterisk-code-review
mailing list