[Asterisk-code-review] modules: change module LOAD FAILUREs to LOAD DECLINES (asterisk[13])
Richard Mudgett
asteriskteam at digium.com
Wed Apr 12 14:51:03 CDT 2017
Richard Mudgett has posted comments on this change. ( https://gerrit.asterisk.org/5450 )
Change subject: modules: change module LOAD_FAILUREs to LOAD_DECLINES
......................................................................
Patch Set 3: Code-Review-1
(11 comments)
These modules are returning LOAD_FAILURE:
res/res_limit.c
funcs/func_holdintercept.c
funcs/func_talkdetect.c
apps/app_zapateller.c
apps/app_dahdiras.c
https://gerrit.asterisk.org/#/c/5450/3/addons/cdr_mysql.c
File addons/cdr_mysql.c:
Line 695: return res;
We could return LOAD_FAILURE here because it is defined as -1 and ast_cli_register_multiple() could return -1.
Should be:
if (res) {
my_unload_module(0);
return DECLINE
}
return SUCCESS
https://gerrit.asterisk.org/#/c/5450/3/channels/chan_iax2.c
File channels/chan_iax2.c:
Line 14892: return AST_MODULE_LOAD_DECLINE;
This should just be -1 as the symbol is used incorrectly.
https://gerrit.asterisk.org/#/c/5450/3/channels/chan_skinny.c
File channels/chan_skinny.c:
Line 8705: return -1;
This is a LOAD_FAILURE
https://gerrit.asterisk.org/#/c/5450/3/formats/format_sln.c
File formats/format_sln.c:
Line 256: return AST_MODULE_LOAD_DECLINE;
Should call unload_module() to unregister any formats that got registered.
Line 270: res |= AST_MODULE_LOAD_FAILURE;
This is a misuse of the LOAD_FAILURE symbol. Should just be -1.
https://gerrit.asterisk.org/#/c/5450/3/formats/format_wav.c
File formats/format_wav.c:
Line 547: return AST_MODULE_LOAD_DECLINE;
Should call unload_module() because there is more than one format being registered.
https://gerrit.asterisk.org/#/c/5450/3/res/res_ari_events.c
File res/res_ari_events.c:
Line 442: return res;
This could return -1 for LOAD_FAILURE
Need to call unload_module() if res non-zero.
https://gerrit.asterisk.org/#/c/5450/3/res/res_calendar.c
File res/res_calendar.c:
Line 1899: unload_module();
I don't think we can call unload_module() at this time because refresh_thread hasn't been created so we cannot join it.
https://gerrit.asterisk.org/#/c/5450/3/res/res_pjsip/config_transport.c
File res/res_pjsip/config_transport.c:
Line 1350: return AST_MODULE_LOAD_DECLINE;
This is a misuse of the symbol. Should just be -1
https://gerrit.asterisk.org/#/c/5450/3/res/res_smdi.c
File res/res_smdi.c:
Line 1131: return AST_MODULE_LOAD_DECLINE;
This is a misuse of the define. It needs to be -1.
Line 1374: return res;
This needs to return LOAD_DECLINE
--
To view, visit https://gerrit.asterisk.org/5450
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I5f4b50623d9b5a6cb7c5624a8c5c1274c13b2b25
Gerrit-PatchSet: 3
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-HasComments: Yes
More information about the asterisk-code-review
mailing list