From: Corey Farrell Date: Fri, 15 Dec 2017 13:56:13 +0000 (-0500) Subject: res_smdi: Fix shutdown ref. X-Git-Tag: 15.2.0-rc1~30^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=044ed1c5d8d56e7375c528d0cfe243665c6851a1;p=thirdparty%2Fasterisk.git res_smdi: Fix shutdown ref. When adding shutdown refs for OPTIONAL_API components I accidentally added it to the unload_module function in res_smdi. Move it to load_module. Change-Id: I2b9da38fbc11ef78ea23dbb2df92b684be7f647c --- diff --git a/res/res_smdi.c b/res/res_smdi.c index 0edabb83c5..e2b2e1b061 100644 --- a/res/res_smdi.c +++ b/res/res_smdi.c @@ -1377,6 +1377,9 @@ static int load_module(void) ast_custom_function_register(&smdi_msg_retrieve_function); ast_custom_function_register(&smdi_msg_function); + /* For Optional API. */ + ast_module_shutdown_ref(AST_MODULE_SELF); + return AST_MODULE_LOAD_SUCCESS; } @@ -1406,9 +1409,6 @@ static int _unload_module(int fromload) smdi_loaded = 0; - /* For Optional API. */ - ast_module_shutdown_ref(AST_MODULE_SELF); - return 0; }