[Asterisk-cvs] asterisk pbx.c,1.119,1.120

citats at lists.digium.com citats at lists.digium.com
Mon May 17 16:58:28 CDT 2004


Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/home/citats/cvs/asterisk

Modified Files:
	pbx.c 
Log Message:
Make variables work in manager originate again


Index: pbx.c
===================================================================
RCS file: /usr/cvsroot/asterisk/pbx.c,v
retrieving revision 1.119
retrieving revision 1.120
diff -u -d -r1.119 -r1.120
--- pbx.c	9 May 2004 07:19:00 -0000	1.119
+++ pbx.c	17 May 2004 21:10:26 -0000	1.120
@@ -3963,6 +3963,11 @@
 		strncpy(as->exten,  exten, sizeof(as->exten) - 1);
 		as->priority = priority;
 		as->timeout = timeout;
+		if (variable) {
+			tmp = ast_strdupa(variable);
+				for (var = strtok_r(tmp, "|", &tmp); var; var = strtok_r(NULL, "|", &tmp))
+					pbx_builtin_setvar( chan, var );
+		}
 		pthread_attr_init(&attr);
 		pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
 		if (pthread_create(&as->p, &attr, async_wait, as)) {
@@ -4068,6 +4073,11 @@
 		if (appdata)
 			strncpy(as->appdata,  appdata, sizeof(as->appdata) - 1);
 		as->timeout = timeout;
+		if (variable) {
+			tmp = ast_strdupa(variable);
+				for (var = strtok_r(tmp, "|", &tmp); var; var = strtok_r(NULL, "|", &tmp))
+					pbx_builtin_setvar( chan, var );
+		}
 		/* Start a new thread, and get something handling this channel. */
 		pthread_attr_init(&attr);
 		pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);




More information about the svn-commits mailing list