[Asterisk-cvs] asterisk/pbx pbx_config.c,1.51,1.52

markster at lists.digium.com markster at lists.digium.com
Wed Jan 12 23:10:58 CST 2005


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

Modified Files:
	pbx_config.c 
Log Message:
Implement eswitch for evalulating variables at runtime (bug #3168)


Index: pbx_config.c
===================================================================
RCS file: /usr/cvsroot/asterisk/pbx/pbx_config.c,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -d -r1.51 -r1.52
--- pbx_config.c	24 Oct 2004 02:53:24 -0000	1.51
+++ pbx_config.c	13 Jan 2005 05:14:56 -0000	1.52
@@ -1754,7 +1754,7 @@
 						pbx_substitute_variables_helper(NULL, v->value, realvalue, sizeof(realvalue) - 1);
 						if (ast_context_add_ignorepat2(con, realvalue, registrar))
 							ast_log(LOG_WARNING, "Unable to include ignorepat '%s' in context '%s'\n", v->value, cxt);
-					} else if (!strcasecmp(v->name, "switch") || !strcasecmp(v->name, "lswitch")) {
+					} else if (!strcasecmp(v->name, "switch") || !strcasecmp(v->name, "lswitch") || !strcasecmp(v->name, "eswitch")) {
 						char *stringp=NULL;
 						memset(realvalue, 0, sizeof(realvalue));
 						if (!strcasecmp(v->name, "switch"))
@@ -1767,7 +1767,7 @@
 						data = strsep(&stringp, "");
 						if (!data)
 							data = "";
-						if (ast_context_add_switch2(con, appl, data, registrar))
+						if (ast_context_add_switch2(con, appl, data, !strcasecmp(v->name, "eswitch"), registrar))
 							ast_log(LOG_WARNING, "Unable to include switch '%s' in context '%s'\n", v->value, cxt);
 					}
 					v = v->next;




More information about the svn-commits mailing list