[Asterisk-code-review] res smdi: Fix shutdown ref. (asterisk[13])

Corey Farrell asteriskteam at digium.com
Fri Dec 15 07:59:31 CST 2017


Corey Farrell has uploaded this change for review. ( https://gerrit.asterisk.org/7598


Change subject: res_smdi: Fix shutdown ref.
......................................................................

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
---
M res/res_smdi.c
1 file changed, 3 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/98/7598/1

diff --git a/res/res_smdi.c b/res/res_smdi.c
index 7b4c42b..a20c836 100644
--- a/res/res_smdi.c
+++ b/res/res_smdi.c
@@ -1379,6 +1379,9 @@
 	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;
 }
 
@@ -1407,9 +1410,6 @@
 	}
 
 	smdi_loaded = 0;
-
-	/* For Optional API. */
-	ast_module_shutdown_ref(ast_module_info->self);
 
 	return 0;
 }

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

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2b9da38fbc11ef78ea23dbb2df92b684be7f647c
Gerrit-Change-Number: 7598
Gerrit-PatchSet: 1
Gerrit-Owner: Corey Farrell <git at cfware.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171215/c8b69626/attachment.html>


More information about the asterisk-code-review mailing list