[Asterisk-code-review] translators: Don't use ast module running ref. (asterisk[master])

Joshua Colp asteriskteam at digium.com
Thu Jan 4 14:49:07 CST 2018


Joshua Colp has submitted this change and it was merged. ( https://gerrit.asterisk.org/7804 )

Change subject: translators: Don't use ast_module_running_ref.
......................................................................

translators: Don't use ast_module_running_ref.

Translators are run during module load before the module is actually
running, so it cannot use ast_module_running_ref.

ASTERISK-20346

Change-Id: Iaa0e75da99c696e38000f1a41e340abbd7a88f56
---
M main/translate.c
1 file changed, 1 insertion(+), 4 deletions(-)

Approvals:
  Kevin Harwell: Looks good to me, but someone else must approve
  Joshua Colp: Looks good to me, approved; Approved for Submit



diff --git a/main/translate.c b/main/translate.c
index 3d49057..02717c5 100644
--- a/main/translate.c
+++ b/main/translate.c
@@ -342,10 +342,7 @@
 	 */
 	pvt->explicit_dst = ao2_bump(explicit_dst);
 
-	if (!ast_module_running_ref(t->module)) {
-		ast_free(pvt);
-		return NULL;
-	}
+	ast_module_ref(t->module);
 
 	/* call local init routine, if present */
 	if (t->newpvt && t->newpvt(pvt)) {

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

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Iaa0e75da99c696e38000f1a41e340abbd7a88f56
Gerrit-Change-Number: 7804
Gerrit-PatchSet: 2
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180104/1b773ee6/attachment.html>


More information about the asterisk-code-review mailing list