[asterisk-commits] branch group/testframework r16582 - in /team/group/testframework: ./ apps/ ch...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu Mar 30 15:56:52 MST 2006


Author: russell
Date: Thu Mar 30 16:56:46 2006
New Revision: 16582

URL: http://svn.digium.com/view/asterisk?rev=16582&view=rev
Log:
seriously, this time ...

Modified:
    team/group/testframework/   (props changed)
    team/group/testframework/apps/app_dial.c
    team/group/testframework/apps/app_echo.c
    team/group/testframework/apps/app_exec.c
    team/group/testframework/apps/app_macro.c
    team/group/testframework/apps/app_meetme.c
    team/group/testframework/apps/app_page.c
    team/group/testframework/apps/app_voicemail.c
    team/group/testframework/apps/app_while.c
    team/group/testframework/asterisk.c
    team/group/testframework/channels/chan_iax2.c
    team/group/testframework/channels/chan_oss.c
    team/group/testframework/codecs/gsm/Makefile
    team/group/testframework/include/asterisk/channel.h
    team/group/testframework/include/asterisk/pbx.h
    team/group/testframework/pbx.c
    team/group/testframework/pbx/pbx_dundi.c
    team/group/testframework/pbx/pbx_loopback.c
    team/group/testframework/pbx/pbx_realtime.c
    team/group/testframework/res/res_agi.c
    team/group/testframework/res/res_features.c

Propchange: team/group/testframework/
------------------------------------------------------------------------------
    automerge = *

Propchange: team/group/testframework/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu Mar 30 16:56:46 2006
@@ -1,1 +1,1 @@
-/trunk:1-16552
+/trunk:1-16580

Modified: team/group/testframework/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/team/group/testframework/apps/app_dial.c?rev=16582&r1=16581&r2=16582&view=diff
==============================================================================
--- team/group/testframework/apps/app_dial.c (original)
+++ team/group/testframework/apps/app_dial.c Thu Mar 30 16:56:46 2006
@@ -1449,7 +1449,7 @@
 					if (*ch == '^')
 						*ch = '|';
 				}
-				res = pbx_exec(peer, app, opt_args[OPT_ARG_CALLEE_MACRO], 1);
+				res = pbx_exec(peer, app, opt_args[OPT_ARG_CALLEE_MACRO]);
 				ast_log(LOG_DEBUG, "Macro exited with status %d\n", res);
 				res = 0;
 			} else {

Modified: team/group/testframework/apps/app_echo.c
URL: http://svn.digium.com/view/asterisk/team/group/testframework/apps/app_echo.c?rev=16582&r1=16581&r2=16582&view=diff
==============================================================================
--- team/group/testframework/apps/app_echo.c (original)
+++ team/group/testframework/apps/app_echo.c Thu Mar 30 16:56:46 2006
@@ -59,7 +59,6 @@
 	int res = -1;
 	int format;
 	struct localuser *u;
-	struct ast_frame *f;
 
 	LOCAL_USER_ADD(u);
 
@@ -68,7 +67,7 @@
 	ast_set_read_format(chan, format);
 
 	while (ast_waitfor(chan, -1) > -1) {
-		f = ast_read(chan);
+		struct ast_frame *f = ast_read(chan);
 		if (!f)
 			break;
 		f->delivery.tv_sec = 0;

Modified: team/group/testframework/apps/app_exec.c
URL: http://svn.digium.com/view/asterisk/team/group/testframework/apps/app_exec.c?rev=16582&r1=16581&r2=16582&view=diff
==============================================================================
--- team/group/testframework/apps/app_exec.c (original)
+++ team/group/testframework/apps/app_exec.c Thu Mar 30 16:56:46 2006
@@ -82,7 +82,7 @@
 			if (appname) {
 				app = pbx_findapp(appname);
 				if (app) {
-					res = pbx_exec(chan, app, args, 1);
+					res = pbx_exec(chan, app, args);
 				} else {
 					ast_log(LOG_WARNING, "Could not find application (%s)\n", appname);
 					res = -1;

Modified: team/group/testframework/apps/app_macro.c
URL: http://svn.digium.com/view/asterisk/team/group/testframework/apps/app_macro.c?rev=16582&r1=16581&r2=16582&view=diff
==============================================================================
--- team/group/testframework/apps/app_macro.c (original)
+++ team/group/testframework/apps/app_macro.c Thu Mar 30 16:56:46 2006
@@ -188,7 +188,7 @@
   		snprintf(varname, sizeof(varname), "ARG%d", argc);
 		s = pbx_builtin_getvar_helper(chan, varname);
 		if (s)
-			oldargs[argc] = strdup(s);
+			oldargs[argc] = ast_strdup(s);
 		pbx_builtin_setvar_helper(chan, varname, cur);
 		argc++;
 	}

Modified: team/group/testframework/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/team/group/testframework/apps/app_meetme.c?rev=16582&r1=16581&r2=16582&view=diff
==============================================================================
--- team/group/testframework/apps/app_meetme.c (original)
+++ team/group/testframework/apps/app_meetme.c Thu Mar 30 16:56:46 2006
@@ -1143,7 +1143,7 @@
 		app = pbx_findapp("agi");
 		if (app) {
 			char *s = ast_strdupa(agifile);
-			ret = pbx_exec(chan, app, s, 1);
+			ret = pbx_exec(chan, app, s);
 		} else {
 			ast_log(LOG_WARNING, "Could not find application (agi)\n");
 			ret = -2;

Modified: team/group/testframework/apps/app_page.c
URL: http://svn.digium.com/view/asterisk/team/group/testframework/apps/app_page.c?rev=16582&r1=16581&r2=16582&view=diff
==============================================================================
--- team/group/testframework/apps/app_page.c (original)
+++ team/group/testframework/apps/app_page.c Thu Mar 30 16:56:46 2006
@@ -186,7 +186,7 @@
 	}
 	if (!res) {
 		snprintf(meetmeopts, sizeof(meetmeopts), "%ud|A%sqxd", confid, ast_test_flag(&flags, PAGE_DUPLEX) ? "" : "t");
-		pbx_exec(chan, app, meetmeopts, 1);
+		pbx_exec(chan, app, meetmeopts);
 	}
 
 	LOCAL_USER_REMOVE(u);

Modified: team/group/testframework/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/group/testframework/apps/app_voicemail.c?rev=16582&r1=16581&r2=16582&view=diff
==============================================================================
--- team/group/testframework/apps/app_voicemail.c (original)
+++ team/group/testframework/apps/app_voicemail.c Thu Mar 30 16:56:46 2006
@@ -3422,7 +3422,7 @@
 				old_priority = chan->priority;
 				
 				/* call the the Directory, changes the channel */
-				res = pbx_exec(chan, app, context ? context : "default", 1);
+				res = pbx_exec(chan, app, context ? context : "default");
 				
 				ast_copy_string(username, chan->exten, sizeof(username));
 				

Modified: team/group/testframework/apps/app_while.c
URL: http://svn.digium.com/view/asterisk/team/group/testframework/apps/app_while.c?rev=16582&r1=16581&r2=16582&view=diff
==============================================================================
--- team/group/testframework/apps/app_while.c (original)
+++ team/group/testframework/apps/app_while.c Thu Mar 30 16:56:46 2006
@@ -101,7 +101,7 @@
 
 		if (ast_true(expr)) { 
 			if ((app = pbx_findapp(myapp))) {
-				res = pbx_exec(chan, app, mydata, 1);
+				res = pbx_exec(chan, app, mydata);
 			} else {
 				ast_log(LOG_WARNING, "Count not find application! (%s)\n", myapp);
 				res = -1;

Modified: team/group/testframework/asterisk.c
URL: http://svn.digium.com/view/asterisk/team/group/testframework/asterisk.c?rev=16582&r1=16581&r2=16582&view=diff
==============================================================================
--- team/group/testframework/asterisk.c (original)
+++ team/group/testframework/asterisk.c Thu Mar 30 16:56:46 2006
@@ -1865,7 +1865,7 @@
 	/* init with buildtime config */
 	ast_copy_string(ast_config_AST_CONFIG_DIR, AST_CONFIG_DIR, sizeof(ast_config_AST_CONFIG_DIR));
 	ast_copy_string(ast_config_AST_SPOOL_DIR, AST_SPOOL_DIR, sizeof(ast_config_AST_SPOOL_DIR));
-	ast_copy_string(ast_config_AST_MODULE_DIR, AST_MODULE_DIR, sizeof(ast_config_AST_VAR_DIR));
+	ast_copy_string(ast_config_AST_MODULE_DIR, AST_MODULE_DIR, sizeof(ast_config_AST_MODULE_DIR));
  	snprintf(ast_config_AST_MONITOR_DIR, sizeof(ast_config_AST_MONITOR_DIR) - 1, "%s/monitor", ast_config_AST_SPOOL_DIR);
 	ast_copy_string(ast_config_AST_VAR_DIR, AST_VAR_DIR, sizeof(ast_config_AST_VAR_DIR));
 	ast_copy_string(ast_config_AST_LOG_DIR, AST_LOG_DIR, sizeof(ast_config_AST_LOG_DIR));

Modified: team/group/testframework/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/team/group/testframework/channels/chan_iax2.c?rev=16582&r1=16581&r2=16582&view=diff
==============================================================================
--- team/group/testframework/channels/chan_iax2.c (original)
+++ team/group/testframework/channels/chan_iax2.c Thu Mar 30 16:56:46 2006
@@ -9573,7 +9573,7 @@
 }
 
 /*! \brief Execute IAX2 dialplan switch */
-static int iax2_exec(struct ast_channel *chan, const char *context, const char *exten, int priority, const char *callerid, int newstack, const char *data)
+static int iax2_exec(struct ast_channel *chan, const char *context, const char *exten, int priority, const char *callerid, const char *data)
 {
 	char odata[256];
 	char req[256];
@@ -9589,7 +9589,7 @@
 		if (dialstatus) {
 			dial = pbx_findapp(dialstatus);
 			if (dial) 
-				pbx_exec(chan, dial, "", newstack);
+				pbx_exec(chan, dial, "");
 		}
 		return -1;
 	} else if (priority != 1)
@@ -9618,7 +9618,7 @@
 	ast_mutex_unlock(&dpcache_lock);
 	dial = pbx_findapp("Dial");
 	if (dial) {
-		return pbx_exec(chan, dial, req, newstack);
+		return pbx_exec(chan, dial, req);
 	} else {
 		ast_log(LOG_WARNING, "No dial application registered\n");
 	}

Modified: team/group/testframework/channels/chan_oss.c
URL: http://svn.digium.com/view/asterisk/team/group/testframework/channels/chan_oss.c?rev=16582&r1=16581&r2=16582&view=diff
==============================================================================
--- team/group/testframework/channels/chan_oss.c (original)
+++ team/group/testframework/channels/chan_oss.c Thu Mar 30 16:56:46 2006
@@ -671,7 +671,7 @@
 		ast_log(LOG_WARNING, "Failed to set audio device to mono\n");
 		return -1;
 	}
-	fmt = desired = 8000; /* 8000 Hz desired */
+	fmt = desired = DEFAULT_SAMPLE_RATE; /* 8000 Hz desired */
 	res = ioctl(fd, SNDCTL_DSP_SPEED, &fmt);
 
 	if (res < 0) {

Modified: team/group/testframework/codecs/gsm/Makefile
URL: http://svn.digium.com/view/asterisk/team/group/testframework/codecs/gsm/Makefile?rev=16582&r1=16581&r2=16582&view=diff
==============================================================================
--- team/group/testframework/codecs/gsm/Makefile (original)
+++ team/group/testframework/codecs/gsm/Makefile Thu Mar 30 16:56:46 2006
@@ -38,7 +38,7 @@
 ######### probably require gcc. 
 
 ifeq (, $(findstring $(OSARCH) , Darwin SunOS ))
-ifeq (, $(findstring $(PROC) , x86_64 ultrasparc sparc64 arm ppc ppc64 ia64 ))
+ifeq (, $(findstring $(PROC) , x86_64 amd64 ultrasparc sparc64 arm ppc ppc64 ia64 ))
 ifeq (, $(findstring $(shell uname -m) , ppc ppc64 alpha armv4l ))
 OPTIMIZE+=-march=$(PROC)
 endif
@@ -215,7 +215,7 @@
 # XXX Keep a space after each findstring argument
 # XXX should merge with GSM_OBJECTS
 ifeq (${OSARCH},Linux)
-ifeq (,$(findstring $(shell uname -m) , x86_64 ppc ppc64 alpha armv4l sparc64 parisc ))
+ifeq (,$(findstring $(shell uname -m) , x86_64 amd64 ppc ppc64 alpha armv4l sparc64 parisc ))
 ifeq (,$(findstring ${PROC} , arm ia64 ))
 GSM_SOURCES+= $(SRC)/k6opt.s
 endif
@@ -267,7 +267,7 @@
 		$(SRC)/table.o
 
 ifeq (${OSARCH},Linux)
-ifeq (,$(findstring $(shell uname -m) , x86_64 ppc ppc64 alpha armv4l sparc64 parisc ))
+ifeq (,$(findstring $(shell uname -m) , x86_64 amd64 ppc ppc64 alpha armv4l sparc64 parisc ))
 ifeq (,$(findstring ${PROC} , arm ia64 ))
 GSM_OBJECTS+= $(SRC)/k6opt.o
 endif

Modified: team/group/testframework/include/asterisk/channel.h
URL: http://svn.digium.com/view/asterisk/team/group/testframework/include/asterisk/channel.h?rev=16582&r1=16581&r2=16582&view=diff
==============================================================================
--- team/group/testframework/include/asterisk/channel.h (original)
+++ team/group/testframework/include/asterisk/channel.h Thu Mar 30 16:56:46 2006
@@ -317,10 +317,8 @@
 	/*! Procedure causing blocking */
 	const char *blockproc;			
 
-	/*! Current application */
-	char *appl;				
-	/*! Data passed to current application */
-	char *data;				
+	const char *appl;				/*! Current application */
+	const char *data;				/*! Data passed to current application */
 	
 	/*! Which fd had an event detected on */
 	int fdno;				

Modified: team/group/testframework/include/asterisk/pbx.h
URL: http://svn.digium.com/view/asterisk/team/group/testframework/include/asterisk/pbx.h?rev=16582&r1=16581&r2=16582&view=diff
==============================================================================
--- team/group/testframework/include/asterisk/pbx.h (original)
+++ team/group/testframework/include/asterisk/pbx.h Thu Mar 30 16:56:46 2006
@@ -82,22 +82,20 @@
 	struct ast_custom_function *next;
 };
 
+/*! \brief All switch functions have the same interface, so define a type for them */
+typedef int (ast_switch_f)(struct ast_channel *chan, const char *context,
+	const char *exten, int priority, const char *callerid, const char *data);
+
 /*! Data structure associated with an asterisk switch */
 struct ast_switch {
-	/*! NULL */
 	struct ast_switch *next;	
-	/*! Name of the switch */
-	const char *name;				
-	/*! Description of the switch */
-	const char *description;		
+	const char *name;			/*! Name of the switch */
+	const char *description;		/*! Description of the switch */
 	
-	int (*exists)(struct ast_channel *chan, const char *context, const char *exten, int priority, const char *callerid, const char *data);
-	
-	int (*canmatch)(struct ast_channel *chan, const char *context, const char *exten, int priority, const char *callerid, const char *data);
-	
-	int (*exec)(struct ast_channel *chan, const char *context, const char *exten, int priority, const char *callerid, int newstack, const char *data);
-
-	int (*matchmore)(struct ast_channel *chan, const char *context, const char *exten, int priority, const char *callerid, const char *data);
+	ast_switch_f *exists;
+	ast_switch_f *canmatch;
+	ast_switch_f *exec;
+	ast_switch_f *matchmore;
 };
 
 struct ast_timing {
@@ -160,7 +158,6 @@
  * \param c channel to execute on
  * \param app which app to execute
  * \param data the data passed into the app
- * \param newstack stack pointer
  *
  * This application executes an application on a given channel.  It
  * saves the stack and executes the given appliation passing in
@@ -168,7 +165,7 @@
  *
  * \return 0 on success, and -1 on failure
  */
-int pbx_exec(struct ast_channel *c, struct ast_app *app, void *data, int newstack);
+int pbx_exec(struct ast_channel *c, struct ast_app *app, void *data);
 
 /*!
  * \brief Register a new context
@@ -484,22 +481,6 @@
  * \retval -1 on failure.
  */
 int ast_spawn_extension(struct ast_channel *c, const char *context, 
-	const char *exten, int priority, const char *callerid);
-
-/*! 
- * \brief Execute an extension.
- * 
- * \param c channel to execute upon
- * \param context which context extension is in
- * \param exten extension to execute
- * \param priority priority to execute within the given extension
- * \param callerid Caller-ID
- *
- * If it's not available, do whatever you should do for
- * default extensions and halt the thread if necessary.  This function does not
- * return, except on error.
- */
-int ast_exec_extension(struct ast_channel *c, const char *context, 
 	const char *exten, int priority, const char *callerid);
 
 /*! 

Modified: team/group/testframework/pbx.c
URL: http://svn.digium.com/view/asterisk/team/group/testframework/pbx.c?rev=16582&r1=16581&r2=16582&view=diff
==============================================================================
--- team/group/testframework/pbx.c (original)
+++ team/group/testframework/pbx.c Thu Mar 30 16:56:46 2006
@@ -478,34 +478,29 @@
    how many times it is called, it returns to the same place */
 int pbx_exec(struct ast_channel *c, 		/*!< Channel */
 		struct ast_app *app,		/*!< Application */
-		void *data,			/*!< Data for execution */
-		int newstack)			/*!< Force stack increment */
+		void *data)			/*!< Data for execution */
 {
 	int res;
 	
-	char *saved_c_appl;
-	char *saved_c_data;
+	const char *saved_c_appl;
+	const char *saved_c_data;
 	
 	int (*execute)(struct ast_channel *chan, void *data) = app->execute; 
 
-	if (newstack) {
-		if (c->cdr)
-			ast_cdr_setapp(c->cdr, app->name, data);
-
-		/* save channel values */
-		saved_c_appl= c->appl;
-		saved_c_data= c->data;
-
-		c->appl = app->name;
-		c->data = data;		
-		res = execute(c, data);
-		/* restore channel values */
-		c->appl= saved_c_appl;
-		c->data= saved_c_data;
-		return res;
-	} else
-		ast_log(LOG_WARNING, "You really didn't want to call this function with newstack set to 0\n");
-	return -1;
+	if (c->cdr)
+		ast_cdr_setapp(c->cdr, app->name, data);
+
+	/* save channel values */
+	saved_c_appl= c->appl;
+	saved_c_data= c->data;
+
+	c->appl = app->name;
+	c->data = data;		
+	res = execute(c, data);
+	/* restore channel values */
+	c->appl= saved_c_appl;
+	c->data= saved_c_data;
+	return res;
 }
 
 
@@ -514,7 +509,6 @@
 
 #define HELPER_EXISTS 0
 #define HELPER_SPAWN 1
-#define HELPER_EXEC 2
 #define HELPER_CANMATCH 3
 #define HELPER_MATCHMORE 4
 #define HELPER_FINDLABEL 5
@@ -1500,7 +1494,6 @@
 	struct ast_switch *sw;
 	char *data;
 	const char *foundcontext=NULL;
-	int newstack = 0;
 	int res;
 	int status = 0;
 	char *incstack[AST_PBX_MAX_STACK];
@@ -1536,9 +1529,6 @@
 			ast_mutex_unlock(&conlock);
 			return -1;
 		case HELPER_SPAWN:
-			newstack++;
-			/* Fall through */
-		case HELPER_EXEC:
 			app = pbx_findapp(e->app);
 			ast_mutex_unlock(&conlock);
 			if (app) {
@@ -1551,7 +1541,7 @@
 				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, passdata, (newstack ? "in new stack" : "in same stack"));
+						snprintf(atmp2, EXT_DATA_SIZE+100, "%s(\"%s\", \"%s\") %s", app->name, c->name, passdata, "in new stack");
 						pbx_builtin_setvar_helper(c, atmp, atmp2);
 				}
 				if (option_verbose > 2)
@@ -1559,7 +1549,7 @@
 								term_color(tmp, app->name, COLOR_BRCYAN, 0, sizeof(tmp)),
 								term_color(tmp2, c->name, COLOR_BRMAGENTA, 0, sizeof(tmp2)),
 								term_color(tmp3, passdata, COLOR_BRMAGENTA, 0, sizeof(tmp3)),
-								(newstack ? "in new stack" : "in same stack"));
+								"in new stack");
 				manager_event(EVENT_FLAG_CALL, "Newexten", 
 					"Channel: %s\r\n"
 					"Context: %s\r\n"
@@ -1569,7 +1559,7 @@
 					"AppData: %s\r\n"
 					"Uniqueid: %s\r\n",
 					c->name, c->context, c->exten, c->priority, app->name, passdata, c->uniqueid);
-				res = pbx_exec(c, app, passdata, newstack);
+				res = pbx_exec(c, app, passdata);
 				return res;
 			} else {
 				ast_log(LOG_WARNING, "No application '%s' for extension (%s, %s, %d)\n", e->app, context, exten, priority);
@@ -1594,12 +1584,9 @@
 			ast_mutex_unlock(&conlock);
 			return -1;
 		case HELPER_SPAWN:
-			newstack++;
-			/* Fall through */
-		case HELPER_EXEC:
 			ast_mutex_unlock(&conlock);
 			if (sw->exec)
-				res = sw->exec(c, foundcontext ? foundcontext : context, exten, priority, callerid, newstack, data);
+				res = sw->exec(c, foundcontext ? foundcontext : context, exten, priority, callerid, data);
 			else {
 				ast_log(LOG_WARNING, "No execution engine for switch %s\n", sw->name);
 				res = -1;
@@ -2073,11 +2060,6 @@
 int ast_spawn_extension(struct ast_channel *c, const char *context, const char *exten, int priority, const char *callerid) 
 {
 	return pbx_extension_helper(c, NULL, context, exten, priority, NULL, callerid, HELPER_SPAWN);
-}
-
-int ast_exec_extension(struct ast_channel *c, const char *context, const char *exten, int priority, const char *callerid) 
-{
-	return pbx_extension_helper(c, NULL, context, exten, priority, NULL, callerid, HELPER_EXEC);
 }
 
 static int __ast_pbx_run(struct ast_channel *c)
@@ -4600,7 +4582,7 @@
 			if (app) {
 				if (option_verbose > 2)
 					ast_verbose(VERBOSE_PREFIX_3 "Launching %s(%s) on %s\n", as->app, as->appdata, chan->name);
-				pbx_exec(chan, app, as->appdata, 1);
+				pbx_exec(chan, app, as->appdata);
 			} else
 				ast_log(LOG_WARNING, "No such application '%s'\n", as->app);
 		} else {
@@ -4814,7 +4796,7 @@
 	if (app) {
 		if (option_verbose > 3)
 			ast_verbose(VERBOSE_PREFIX_4 "Launching %s(%s) on %s\n", tmp->app, tmp->data, tmp->chan->name);
-		pbx_exec(tmp->chan, app, tmp->data, 1);
+		pbx_exec(tmp->chan, app, tmp->data);
 	} else
 		ast_log(LOG_WARNING, "No such application '%s'\n", tmp->app);
 	ast_hangup(tmp->chan);
@@ -5247,7 +5229,7 @@
 		}
 		
 		if ((app = pbx_findapp(ptr2))) {
-			res = pbx_exec(chan, app, ptr1 ? ptr1 : "", 1);
+			res = pbx_exec(chan, app, ptr1 ? ptr1 : "");
 		} else {
 			ast_log(LOG_WARNING, "Cannot locate application %s\n", ptr2);
 			res = -1;

Modified: team/group/testframework/pbx/pbx_dundi.c
URL: http://svn.digium.com/view/asterisk/team/group/testframework/pbx/pbx_dundi.c?rev=16582&r1=16581&r2=16582&view=diff
==============================================================================
--- team/group/testframework/pbx/pbx_dundi.c (original)
+++ team/group/testframework/pbx/pbx_dundi.c Thu Mar 30 16:56:46 2006
@@ -4382,7 +4382,7 @@
 	return dundi_helper(chan, context, exten, priority, data, DUNDI_FLAG_CANMATCH);
 }
 
-static int dundi_exec(struct ast_channel *chan, const char *context, const char *exten, int priority, const char *callerid, int newstack, const char *data)
+static int dundi_exec(struct ast_channel *chan, const char *context, const char *exten, int priority, const char *callerid, const char *data)
 {
 	struct dundi_result results[MAX_RESULTS];
 	int res;
@@ -4428,7 +4428,7 @@
 		snprintf(req, sizeof(req), "%s/%s", results[x].tech, results[x].dest);
 		dial = pbx_findapp("Dial");
 		if (dial)
-			res = pbx_exec(chan, dial, req, newstack);
+			res = pbx_exec(chan, dial, req);
 	} else
 		res = -1;
 	return res;

Modified: team/group/testframework/pbx/pbx_loopback.c
URL: http://svn.digium.com/view/asterisk/team/group/testframework/pbx/pbx_loopback.c?rev=16582&r1=16581&r2=16582&view=diff
==============================================================================
--- team/group/testframework/pbx/pbx_loopback.c (original)
+++ team/group/testframework/pbx/pbx_loopback.c Thu Mar 30 16:56:46 2006
@@ -147,13 +147,11 @@
 	return res;
 }
 
-static int loopback_exec(struct ast_channel *chan, const char *context, const char *exten, int priority, const char *callerid, int newstack, const char *data)
-{
-	LOOPBACK_COMMON;
-	if (newstack)
-		res = ast_spawn_extension(chan, newcontext, newexten, newpriority, callerid);
-	else
-		res = ast_exec_extension(chan, newcontext, newexten, newpriority, callerid);
+static int loopback_exec(struct ast_channel *chan, const char *context, const char *exten, int priority, const char *callerid, const char *data)
+{
+	LOOPBACK_COMMON;
+	res = ast_spawn_extension(chan, newcontext, newexten, newpriority, callerid);
+	/* XXX hmmm... res is overridden ? */
 	if (newpattern && !ast_extension_match(newpattern, exten))
 		res = -1;
 	return res;

Modified: team/group/testframework/pbx/pbx_realtime.c
URL: http://svn.digium.com/view/asterisk/team/group/testframework/pbx/pbx_realtime.c?rev=16582&r1=16581&r2=16582&view=diff
==============================================================================
--- team/group/testframework/pbx/pbx_realtime.c (original)
+++ team/group/testframework/pbx/pbx_realtime.c Thu Mar 30 16:56:46 2006
@@ -177,14 +177,14 @@
 	return res > 0 ? res : 0;
 }
 
-static int realtime_exec(struct ast_channel *chan, const char *context, const char *exten, int priority, const char *callerid, int newstack, const char *data)
+static int realtime_exec(struct ast_channel *chan, const char *context, const char *exten, int priority, const char *callerid, const char *data)
 {
 	char app[256];
 	char appdata[512]="";
 	char *tmp="";
-    char tmp1[80];
-    char tmp2[80];
-    char tmp3[EXT_DATA_SIZE];
+	char tmp1[80];
+	char tmp2[80];
+	char tmp3[EXT_DATA_SIZE];
 	struct ast_app *a;
 	struct ast_variable *v;
 	REALTIME_COMMON(MODE_MATCH);
@@ -218,7 +218,7 @@
 							  "Uniqueid: %s\r\n",
 							  chan->name, chan->context, chan->exten, chan->priority, app, appdata ? appdata : "(NULL)", chan->uniqueid);
 				
-				res = pbx_exec(chan, a, appdata, newstack);
+				res = pbx_exec(chan, a, appdata);
 			} else
 				ast_log(LOG_NOTICE, "No such application '%s' for extension '%s' in context '%s'\n", app, exten, context);
 		}

Modified: team/group/testframework/res/res_agi.c
URL: http://svn.digium.com/view/asterisk/team/group/testframework/res/res_agi.c?rev=16582&r1=16581&r2=16582&view=diff
==============================================================================
--- team/group/testframework/res/res_agi.c (original)
+++ team/group/testframework/res/res_agi.c Thu Mar 30 16:56:46 2006
@@ -1090,7 +1090,7 @@
 	app = pbx_findapp(argv[1]);
 
 	if (app) {
-		res = pbx_exec(chan, app, argv[2], 1);
+		res = pbx_exec(chan, app, argv[2]);
 	} else {
 		ast_log(LOG_WARNING, "Could not find application (%s)\n", argv[1]);
 		res = -2;

Modified: team/group/testframework/res/res_features.c
URL: http://svn.digium.com/view/asterisk/team/group/testframework/res/res_features.c?rev=16582&r1=16581&r2=16582&view=diff
==============================================================================
--- team/group/testframework/res/res_features.c (original)
+++ team/group/testframework/res/res_features.c Thu Mar 30 16:56:46 2006
@@ -502,7 +502,7 @@
 		if (option_verbose > 3)
 			ast_verbose(VERBOSE_PREFIX_3 "User hit '%s' to record call. filename: %s\n", code, args);
 
-		pbx_exec(callee_chan, monitor_app, args, 1);
+		pbx_exec(callee_chan, monitor_app, args);
 		pbx_builtin_setvar_helper(callee_chan, "TOUCH_MONITOR_OUTPUT", touch_filename);
 		pbx_builtin_setvar_helper(caller_chan, "TOUCH_MONITOR_OUTPUT", touch_filename);
 	
@@ -924,7 +924,7 @@
 		struct ast_channel *work = chan;
 		if (ast_test_flag(feature, AST_FEATURE_FLAG_CALLEE))
 			work = peer;
-		res = pbx_exec(work, app, feature->app_args, 1);
+		res = pbx_exec(work, app, feature->app_args);
 		if (res < 0)
 			return res; 
 	} else {
@@ -1267,7 +1267,7 @@
 		if (monitor_app && src) {
 			char *tmp = ast_strdupa(monitor_exec);
 			if (tmp) {
-				pbx_exec(src, monitor_app, tmp, 1);
+				pbx_exec(src, monitor_app, tmp);
 			} else {
 				ast_log(LOG_ERROR, "Monitor failed: out of memory\n");
 			}



More information about the asterisk-commits mailing list