[svn-commits] kpfleming: branch 1.2 r65676 - /branches/1.2/channels/chan_iax2.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Wed May 23 13:06:13 MST 2007


Author: kpfleming
Date: Wed May 23 15:06:13 2007
New Revision: 65676

URL: http://svn.digium.com/view/asterisk?view=rev&rev=65676
Log:
if we are going to set variables on a newly created channel, it should be done *before* we start the PBX on it

Modified:
    branches/1.2/channels/chan_iax2.c

Modified: branches/1.2/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/channels/chan_iax2.c?view=diff&rev=65676&r1=65675&r2=65676
==============================================================================
--- branches/1.2/channels/chan_iax2.c (original)
+++ branches/1.2/channels/chan_iax2.c Wed May 23 15:06:13 2007
@@ -3485,6 +3485,10 @@
 		i->owner = tmp;
 		i->capability = capability;
 		ast_setstate(tmp, state);
+
+		for (v = i->vars ; v ; v = v->next)
+			pbx_builtin_setvar_helper(tmp, v->name, v->value);
+		
 		if (state != AST_STATE_DOWN) {
 			if (ast_pbx_start(tmp)) {
 				ast_log(LOG_WARNING, "Unable to start PBX on %s\n", tmp->name);
@@ -3492,9 +3496,7 @@
 				tmp = NULL;
 			}
 		}
-		for (v = i->vars ; v ; v = v->next)
-			pbx_builtin_setvar_helper(tmp,v->name,v->value);
-		
+
 		ast_mutex_lock(&usecnt_lock);
 		usecnt++;
 		ast_mutex_unlock(&usecnt_lock);



More information about the svn-commits mailing list