[Asterisk-cvs] asterisk pbx.c,1.191,1.192

markster at lists.digium.com markster at lists.digium.com
Wed Dec 29 18:46:09 CST 2004


Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv22282

Modified Files:
	pbx.c 
Log Message:
Log execution stack if option_debug is enabled (bug #3177)


Index: pbx.c
===================================================================
RCS file: /usr/cvsroot/asterisk/pbx.c,v
retrieving revision 1.191
retrieving revision 1.192
diff -u -d -r1.191 -r1.192
--- pbx.c	29 Dec 2004 12:49:35 -0000	1.191
+++ pbx.c	29 Dec 2004 23:40:54 -0000	1.192
@@ -1220,6 +1220,8 @@
 	char tmp[80];
 	char tmp2[80];
 	char tmp3[EXT_DATA_SIZE];
+	char atmp[80];
+	char atmp2[EXT_DATA_SIZE+100];
 
 	if (ast_mutex_lock(&conlock)) {
 		ast_log(LOG_WARNING, "Unable to obtain lock\n");
@@ -1257,8 +1259,12 @@
 					strncpy(c->exten, exten, sizeof(c->exten)-1);
 				c->priority = priority;
 				pbx_substitute_variables(passdata, sizeof(passdata), c, e);
-				if (option_debug)
+				if (option_debug) {
 						ast_log(LOG_DEBUG, "Launching '%s'\n", app->name);
+						snprintf(atmp, 80, "STACK-%s-%s-%d", context, exten, priority);
+						snprintf(atmp2, EXT_DATA_SIZE+100, "%s(\"%s\", \"%s\") %s", app->name, c->name, (!ast_strlen_zero(passdata) ? (char *)passdata : ""), (newstack ? "in new stack" : "in same stack"));
+						pbx_builtin_setvar_helper(c, atmp, atmp2);
+				}
 				if (option_verbose > 2)
 						ast_verbose( VERBOSE_PREFIX_3 "Executing %s(\"%s\", \"%s\") %s\n", 
 								term_color(tmp, app->name, COLOR_BRCYAN, 0, sizeof(tmp)),




More information about the svn-commits mailing list