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

Corey Farrell asteriskteam at digium.com
Fri Dec 15 07:57:46 CST 2017


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


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/97/7597/1

diff --git a/res/res_smdi.c b/res/res_smdi.c
index 0edabb8..e2b2e1b 100644
--- a/res/res_smdi.c
+++ b/res/res_smdi.c
@@ -1377,6 +1377,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;
 }
 
@@ -1405,9 +1408,6 @@
 	}
 
 	smdi_loaded = 0;
-
-	/* For Optional API. */
-	ast_module_shutdown_ref(AST_MODULE_SELF);
 
 	return 0;
 }

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

Gerrit-Project: asterisk
Gerrit-Branch: 15
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2b9da38fbc11ef78ea23dbb2df92b684be7f647c
Gerrit-Change-Number: 7597
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/73c86b53/attachment.html>


More information about the asterisk-code-review mailing list