[svn-commits] branch bweschke/bug_6047 - r8450 in /team/bweschke/bug_6047: ./ apps/ channel...

svn-commits at lists.digium.com svn-commits at lists.digium.com
Sun Jan 22 16:45:27 MST 2006


Author: bweschke
Date: Sun Jan 22 17:45:10 2006
New Revision: 8450

URL: http://svn.digium.com/view/asterisk?rev=8450&view=rev
Log:
 Fixing SVNMerge functionality from the ast_strdupa commit


Added:
    team/bweschke/bug_6047/doc/README.callingpres
      - copied unchanged from r8432, trunk/doc/README.callingpres
Modified:
    team/bweschke/bug_6047/   (props changed)
    team/bweschke/bug_6047/apps/Makefile
    team/bweschke/bug_6047/apps/app_authenticate.c
    team/bweschke/bug_6047/apps/app_chanspy.c
    team/bweschke/bug_6047/apps/app_curl.c
    team/bweschke/bug_6047/apps/app_db.c
    team/bweschke/bug_6047/apps/app_dial.c
    team/bweschke/bug_6047/apps/app_dictate.c
    team/bweschke/bug_6047/apps/app_directory.c
    team/bweschke/bug_6047/apps/app_disa.c
    team/bweschke/bug_6047/apps/app_exec.c
    team/bweschke/bug_6047/apps/app_externalivr.c
    team/bweschke/bug_6047/apps/app_festival.c
    team/bweschke/bug_6047/apps/app_hasnewvoicemail.c
    team/bweschke/bug_6047/apps/app_image.c
    team/bweschke/bug_6047/apps/app_macro.c
    team/bweschke/bug_6047/apps/app_meetme.c
    team/bweschke/bug_6047/apps/app_mixmonitor.c
    team/bweschke/bug_6047/apps/app_osplookup.c
    team/bweschke/bug_6047/apps/app_page.c
    team/bweschke/bug_6047/apps/app_parkandannounce.c
    team/bweschke/bug_6047/apps/app_playback.c
    team/bweschke/bug_6047/apps/app_privacy.c
    team/bweschke/bug_6047/apps/app_queue.c
    team/bweschke/bug_6047/apps/app_random.c
    team/bweschke/bug_6047/apps/app_read.c
    team/bweschke/bug_6047/apps/app_readfile.c
    team/bweschke/bug_6047/apps/app_record.c
    team/bweschke/bug_6047/apps/app_sayunixtime.c
    team/bweschke/bug_6047/apps/app_senddtmf.c
    team/bweschke/bug_6047/apps/app_sendtext.c
    team/bweschke/bug_6047/apps/app_setcallerid.c
    team/bweschke/bug_6047/apps/app_skel.c
    team/bweschke/bug_6047/apps/app_sql_postgres.c
    team/bweschke/bug_6047/apps/app_stack.c
    team/bweschke/bug_6047/apps/app_talkdetect.c
    team/bweschke/bug_6047/apps/app_transfer.c
    team/bweschke/bug_6047/apps/app_url.c
    team/bweschke/bug_6047/apps/app_userevent.c
    team/bweschke/bug_6047/apps/app_verbose.c
    team/bweschke/bug_6047/apps/app_voicemail.c
    team/bweschke/bug_6047/apps/app_while.c
    team/bweschke/bug_6047/apps/app_zapras.c
    team/bweschke/bug_6047/callerid.c
    team/bweschke/bug_6047/channel.c
    team/bweschke/bug_6047/channels/chan_agent.c
    team/bweschke/bug_6047/channels/chan_iax2.c
    team/bweschke/bug_6047/channels/chan_sip.c
    team/bweschke/bug_6047/codecs/codec_a_mu.c
    team/bweschke/bug_6047/codecs/codec_adpcm.c
    team/bweschke/bug_6047/codecs/codec_alaw.c
    team/bweschke/bug_6047/codecs/codec_g723_1.c
    team/bweschke/bug_6047/codecs/codec_g726.c
    team/bweschke/bug_6047/codecs/codec_gsm.c
    team/bweschke/bug_6047/codecs/codec_ilbc.c
    team/bweschke/bug_6047/codecs/codec_lpc10.c
    team/bweschke/bug_6047/codecs/codec_speex.c
    team/bweschke/bug_6047/codecs/codec_ulaw.c
    team/bweschke/bug_6047/codecs/gsm/Makefile
    team/bweschke/bug_6047/configs/alsa.conf.sample
    team/bweschke/bug_6047/configs/sip.conf.sample
    team/bweschke/bug_6047/configs/zapata.conf.sample
    team/bweschke/bug_6047/doc/README.variables
    team/bweschke/bug_6047/formats/format_pcm.c
    team/bweschke/bug_6047/formats/format_pcm_alaw.c
    team/bweschke/bug_6047/funcs/func_cdr.c
    team/bweschke/bug_6047/funcs/func_cut.c
    team/bweschke/bug_6047/funcs/func_logic.c
    team/bweschke/bug_6047/funcs/func_math.c
    team/bweschke/bug_6047/funcs/func_md5.c
    team/bweschke/bug_6047/funcs/func_odbc.c
    team/bweschke/bug_6047/funcs/func_rand.c
    team/bweschke/bug_6047/funcs/func_strings.c
    team/bweschke/bug_6047/include/asterisk/channel.h
    team/bweschke/bug_6047/include/asterisk/utils.h
    team/bweschke/bug_6047/pbx.c
    team/bweschke/bug_6047/res/res_agi.c
    team/bweschke/bug_6047/res/res_crypto.c
    team/bweschke/bug_6047/res/res_features.c
    team/bweschke/bug_6047/res/res_indications.c
    team/bweschke/bug_6047/res/res_monitor.c
    team/bweschke/bug_6047/res/res_musiconhold.c
    team/bweschke/bug_6047/res/res_osp.c

Propchange: team/bweschke/bug_6047/
------------------------------------------------------------------------------
--- svnmerge-blocked (original)
+++ svnmerge-blocked Sun Jan 22 17:45:10 2006
@@ -1,1 +1,1 @@
-/branches/1.2:7490,7497,7517,7529,7546,7550,7552,7557,7580,7586,7595,7605,7641,7663,7706,7738,7771,7792,7812,7870-7871,7898-7900,7915,7960,7965,7970,7976,8047,8112
+/branches/1.2:7490,7497,7517,7529,7546,7550,7552,7557,7580,7586,7595,7605,7641,7663,7706,7738,7771,7792,7812,7870-7871,7898-7900,7915,7960,7965,7970,7976,8047,8112,8394,8412,8418

Propchange: team/bweschke/bug_6047/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Sun Jan 22 17:45:10 2006
@@ -1,1 +1,1 @@
-/trunk:1-8325
+/trunk:1-8433

Modified: team/bweschke/bug_6047/apps/Makefile
URL: http://svn.digium.com/view/asterisk/team/bweschke/bug_6047/apps/Makefile?rev=8450&r1=8449&r2=8450&view=diff
==============================================================================
--- team/bweschke/bug_6047/apps/Makefile (original)
+++ team/bweschke/bug_6047/apps/Makefile Sun Jan 22 17:45:10 2006
@@ -96,7 +96,7 @@
 	$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} $(CURLLIBS)
 
 app_sql_postgres.o: app_sql_postgres.c
-	$(CC) -pipe -I/usr/local/pgsql/include $(CFLAGS) -c -o app_sql_postgres.o app_sql_postgres.c
+	$(CC) -pipe -I$(CROSS_COMPILE_TARGET)/usr/local/pgsql/include -I$(CROSS_COMPILE_TARGET)/usr/include/postgresql $(CFLAGS) -c -o app_sql_postgres.o app_sql_postgres.c
 
 app_sql_postgres.so: app_sql_postgres.o
 	$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} -L/usr/local/pgsql/lib -lpq

Modified: team/bweschke/bug_6047/apps/app_authenticate.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/bug_6047/apps/app_authenticate.c?rev=8450&r1=8449&r2=8450&view=diff
==============================================================================
--- team/bweschke/bug_6047/apps/app_authenticate.c (original)
+++ team/bweschke/bug_6047/apps/app_authenticate.c Sun Jan 22 17:45:10 2006
@@ -128,7 +128,10 @@
 		}
 	}
 	
-	argcopy = ast_strdupa(data);
+	if (!(argcopy = ast_strdupa(data))) {
+		LOCAL_USER_REMOVE(u);
+		return -1;
+	}
 
 	AST_STANDARD_APP_ARGS(arglist,argcopy);
 	

Modified: team/bweschke/bug_6047/apps/app_chanspy.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/bug_6047/apps/app_chanspy.c?rev=8450&r1=8449&r2=8450&view=diff
==============================================================================
--- team/bweschke/bug_6047/apps/app_chanspy.c (original)
+++ team/bweschke/bug_6047/apps/app_chanspy.c Sun Jan 22 17:45:10 2006
@@ -383,7 +383,8 @@
 	struct ast_flags flags;
 	signed char zero_volume = 0;
 
-	args = ast_strdupa(data);
+	if (!(args = ast_strdupa(data)))
+		return -1;
 
 	LOCAL_USER_ADD(u);
 

Modified: team/bweschke/bug_6047/apps/app_curl.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/bug_6047/apps/app_curl.c?rev=8450&r1=8449&r2=8450&view=diff
==============================================================================
--- team/bweschke/bug_6047/apps/app_curl.c (original)
+++ team/bweschke/bug_6047/apps/app_curl.c Sun Jan 22 17:45:10 2006
@@ -128,7 +128,10 @@
 
 	LOCAL_USER_ACF_ADD(u);
 
-	info = ast_strdupa(data);
+	if (!(info = ast_strdupa(data))) {
+		LOCAL_USER_REMOVE(u);
+		return buf;
+	}
 
 	AST_STANDARD_APP_ARGS(args, info);	
 	

Modified: team/bweschke/bug_6047/apps/app_db.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/bug_6047/apps/app_db.c?rev=8450&r1=8449&r2=8450&view=diff
==============================================================================
--- team/bweschke/bug_6047/apps/app_db.c (original)
+++ team/bweschke/bug_6047/apps/app_db.c Sun Jan 22 17:45:10 2006
@@ -75,7 +75,10 @@
 
 	LOCAL_USER_ADD(u);
 
-	argv = ast_strdupa(data);
+	if (!(argv = ast_strdupa(data))) {
+		LOCAL_USER_REMOVE(u);
+		return 0;
+	}
 
 	if (strchr(argv, '/')) {
 		family = strsep(&argv, "/");
@@ -116,7 +119,10 @@
 
 	LOCAL_USER_ADD(u);
 
-	argv = ast_strdupa(data);
+	if (!(argv = ast_strdupa(data))) {
+		LOCAL_USER_REMOVE(u);
+		return 0;
+	}
 
 	if (strchr(argv, '/')) {
 		family = strsep(&argv, "/");

Modified: team/bweschke/bug_6047/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/bug_6047/apps/app_dial.c?rev=8450&r1=8449&r2=8450&view=diff
==============================================================================
--- team/bweschke/bug_6047/apps/app_dial.c (original)
+++ team/bweschke/bug_6047/apps/app_dial.c Sun Jan 22 17:45:10 2006
@@ -786,7 +786,10 @@
 
 	LOCAL_USER_ADD(u);
 
-	parse = ast_strdupa(data);
+	if (!(parse = ast_strdupa(data))) {
+		LOCAL_USER_REMOVE(u);
+		return -1;
+	}
 	
 	AST_STANDARD_APP_ARGS(args, parse);
 
@@ -1623,7 +1626,10 @@
 
 	LOCAL_USER_ADD(u);
 
-	announce = ast_strdupa(data);	
+	if (!(announce = ast_strdupa(data))) {
+		LOCAL_USER_REMOVE(u);
+		return -1;
+	}
 	
 	memset(&peerflags, 0, sizeof(peerflags));
 

Modified: team/bweschke/bug_6047/apps/app_dictate.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/bug_6047/apps/app_dictate.c?rev=8450&r1=8449&r2=8450&view=diff
==============================================================================
--- team/bweschke/bug_6047/apps/app_dictate.c (original)
+++ team/bweschke/bug_6047/apps/app_dictate.c Sun Jan 22 17:45:10 2006
@@ -110,7 +110,8 @@
 	
 	snprintf(dftbase, sizeof(dftbase), "%s/dictate", ast_config_AST_SPOOL_DIR);
 	if (!ast_strlen_zero(data)) {
-		parse = ast_strdupa(data);
+		if (!(parse = ast_strdupa(data)))
+			return -1;
 		AST_STANDARD_APP_ARGS(args, parse);
 	} else
 		args.argc = 0;

Modified: team/bweschke/bug_6047/apps/app_directory.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/bug_6047/apps/app_directory.c?rev=8450&r1=8449&r2=8450&view=diff
==============================================================================
--- team/bweschke/bug_6047/apps/app_directory.c (original)
+++ team/bweschke/bug_6047/apps/app_directory.c Sun Jan 22 17:45:10 2006
@@ -431,7 +431,10 @@
 
 	LOCAL_USER_ADD(u);
 
-	parse = ast_strdupa(data);
+	if (!(parse = ast_strdupa(data))) {
+		LOCAL_USER_REMOVE(u);
+		return -1; 
+	}
 
 	AST_STANDARD_APP_ARGS(args, parse);
 		

Modified: team/bweschke/bug_6047/apps/app_disa.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/bug_6047/apps/app_disa.c?rev=8450&r1=8449&r2=8450&view=diff
==============================================================================
--- team/bweschke/bug_6047/apps/app_disa.c (original)
+++ team/bweschke/bug_6047/apps/app_disa.c Sun Jan 22 17:45:10 2006
@@ -161,7 +161,10 @@
 	ast_log(LOG_DEBUG, "Digittimeout: %d\n", digittimeout);
 	ast_log(LOG_DEBUG, "Responsetimeout: %d\n", firstdigittimeout);
 
-	tmp = ast_strdupa(data);
+	if (!(tmp = ast_strdupa(data))) {
+		LOCAL_USER_REMOVE(u);
+		return -1;
+	}	
 
 	AST_STANDARD_APP_ARGS(args, tmp);
 

Modified: team/bweschke/bug_6047/apps/app_exec.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/bug_6047/apps/app_exec.c?rev=8450&r1=8449&r2=8450&view=diff
==============================================================================
--- team/bweschke/bug_6047/apps/app_exec.c (original)
+++ team/bweschke/bug_6047/apps/app_exec.c Sun Jan 22 17:45:10 2006
@@ -73,23 +73,25 @@
 
 	/* Check and parse arguments */
 	if (data) {
-		s = ast_strdupa(data);
-		appname = strsep(&s, "(");
-		if (s) {
-			endargs = strrchr(s, ')');
-			if (endargs)
-				*endargs = '\0';
-			pbx_substitute_variables_helper(chan, s, args, MAXRESULT - 1);
-		}
-		if (appname) {
-			app = pbx_findapp(appname);
-			if (app) {
-				res = pbx_exec(chan, app, args, 1);
-			} else {
-				ast_log(LOG_WARNING, "Could not find application (%s)\n", appname);
-				res = -1;
+		if ((s = ast_strdupa(data))) {
+			appname = strsep(&s, "(");
+			if (s) {
+				endargs = strrchr(s, ')');
+				if (endargs)
+					*endargs = '\0';
+				pbx_substitute_variables_helper(chan, s, args, MAXRESULT - 1);
 			}
-		}
+			if (appname) {
+				app = pbx_findapp(appname);
+				if (app) {
+					res = pbx_exec(chan, app, args, 1);
+				} else {
+					ast_log(LOG_WARNING, "Could not find application (%s)\n", appname);
+					res = -1;
+				}
+			}
+		} else
+			res = -1;
 	}
 
 	LOCAL_USER_REMOVE(u);

Modified: team/bweschke/bug_6047/apps/app_externalivr.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/bug_6047/apps/app_externalivr.c?rev=8450&r1=8449&r2=8450&view=diff
==============================================================================
--- team/bweschke/bug_6047/apps/app_externalivr.c (original)
+++ team/bweschke/bug_6047/apps/app_externalivr.c Sun Jan 22 17:45:10 2006
@@ -271,7 +271,10 @@
 		goto exit;
 	}
 
-	buf = ast_strdupa(data);
+	if (!(buf = ast_strdupa(data))) {
+		LOCAL_USER_REMOVE(u);
+		return -1;
+	}
 
 	argc = ast_app_separate_args(buf, '|', argv, sizeof(argv) / sizeof(argv[0]));
 

Modified: team/bweschke/bug_6047/apps/app_festival.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/bug_6047/apps/app_festival.c?rev=8450&r1=8449&r2=8450&view=diff
==============================================================================
--- team/bweschke/bug_6047/apps/app_festival.c (original)
+++ team/bweschke/bug_6047/apps/app_festival.c Sun Jan 22 17:45:10 2006
@@ -339,7 +339,11 @@
 		festivalcommand = "(tts_textasterisk \"%s\" 'file)(quit)\n";
 	}
 	
-	data = ast_strdupa(vdata);
+	if (!(data = ast_strdupa(vdata))) {
+		ast_config_destroy(cfg);
+		LOCAL_USER_REMOVE(u);
+		return -1;
+	}
 
 	intstr = strchr(data, '|');
 	if (intstr) {	

Modified: team/bweschke/bug_6047/apps/app_hasnewvoicemail.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/bug_6047/apps/app_hasnewvoicemail.c?rev=8450&r1=8449&r2=8450&view=diff
==============================================================================
--- team/bweschke/bug_6047/apps/app_hasnewvoicemail.c (original)
+++ team/bweschke/bug_6047/apps/app_hasnewvoicemail.c Sun Jan 22 17:45:10 2006
@@ -129,7 +129,10 @@
 
 	LOCAL_USER_ADD(u);
 
-	input = ast_strdupa((char *)data);
+	if (!(input = ast_strdupa(data))) {
+		LOCAL_USER_REMOVE(u);
+		return -1;
+	}
 
 	AST_STANDARD_APP_ARGS(args, input);
 
@@ -188,7 +191,10 @@
 
 	buf[0] = '\0';
 
-	argsstr = ast_strdupa(data);
+	if (!(argsstr = ast_strdupa(data))) {
+		LOCAL_USER_REMOVE(u);
+		return buf;
+	}
 
 	AST_STANDARD_APP_ARGS(args, argsstr);
 

Modified: team/bweschke/bug_6047/apps/app_image.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/bug_6047/apps/app_image.c?rev=8450&r1=8449&r2=8450&view=diff
==============================================================================
--- team/bweschke/bug_6047/apps/app_image.c (original)
+++ team/bweschke/bug_6047/apps/app_image.c Sun Jan 22 17:45:10 2006
@@ -78,7 +78,10 @@
 	
 	LOCAL_USER_ADD(u);
 
-	parse = ast_strdupa(data);
+	if (!(parse = ast_strdupa(data))) {
+		LOCAL_USER_REMOVE(u);
+		return -1;
+	}
 
 	AST_STANDARD_APP_ARGS(args, parse);
 

Modified: team/bweschke/bug_6047/apps/app_macro.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/bug_6047/apps/app_macro.c?rev=8450&r1=8449&r2=8450&view=diff
==============================================================================
--- team/bweschke/bug_6047/apps/app_macro.c (original)
+++ team/bweschke/bug_6047/apps/app_macro.c Sun Jan 22 17:45:10 2006
@@ -307,7 +307,10 @@
 
 	LOCAL_USER_ADD(u);
 
-	expr = ast_strdupa(data);
+	if (!(expr = ast_strdupa(data))) {
+		LOCAL_USER_REMOVE(u);
+		return -1;
+	}
 
 	if ((label_a = strchr(expr, '?'))) {
 		*label_a = '\0';

Modified: team/bweschke/bug_6047/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/bug_6047/apps/app_meetme.c?rev=8450&r1=8449&r2=8450&view=diff
==============================================================================
--- team/bweschke/bug_6047/apps/app_meetme.c (original)
+++ team/bweschke/bug_6047/apps/app_meetme.c Sun Jan 22 17:45:10 2006
@@ -1778,7 +1778,8 @@
 				if (strcasecmp(var->name, "conf"))
 					continue;
 				
-				parse = ast_strdupa(var->value);
+				if (!(parse = ast_strdupa(var->value)))
+					return NULL;
 				
 				AST_STANDARD_APP_ARGS(args, parse);
 				if (!strcasecmp(args.confno, confno)) {
@@ -1834,7 +1835,10 @@
 
 	LOCAL_USER_ADD(u);
 	
-	localdata = ast_strdupa(data);
+	if (!(localdata = ast_strdupa(data))) {
+		LOCAL_USER_REMOVE(u);
+		return -1;
+	}
 
 	AST_STANDARD_APP_ARGS(args, localdata);
 	
@@ -1978,8 +1982,6 @@
 										}
 									}
 								}
-							} else {
-								ast_log(LOG_ERROR, "Out of memory\n");
 							}
 						}
 						var = var->next;

Modified: team/bweschke/bug_6047/apps/app_mixmonitor.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/bug_6047/apps/app_mixmonitor.c?rev=8450&r1=8449&r2=8450&view=diff
==============================================================================
--- team/bweschke/bug_6047/apps/app_mixmonitor.c (original)
+++ team/bweschke/bug_6047/apps/app_mixmonitor.c Sun Jan 22 17:45:10 2006
@@ -333,7 +333,10 @@
 
 	LOCAL_USER_ADD(u);
 
-	parse = ast_strdupa(data);
+	if (!(parse = ast_strdupa(data))) {
+		LOCAL_USER_REMOVE(u);
+		return -1;
+	}
 
 	AST_STANDARD_APP_ARGS(args, parse);
 	

Modified: team/bweschke/bug_6047/apps/app_osplookup.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/bug_6047/apps/app_osplookup.c?rev=8450&r1=8449&r2=8450&view=diff
==============================================================================
--- team/bweschke/bug_6047/apps/app_osplookup.c (original)
+++ team/bweschke/bug_6047/apps/app_osplookup.c Sun Jan 22 17:45:10 2006
@@ -138,7 +138,10 @@
 
 	LOCAL_USER_ADD(u);
 
-	temp = ast_strdupa(data);
+	if (!(temp = ast_strdupa(data))) {
+		LOCAL_USER_REMOVE(u);
+		return -1;
+	}
 
 	AST_STANDARD_APP_ARGS(args, temp);
 
@@ -196,7 +199,10 @@
 
 	LOCAL_USER_ADD(u);
 
-	temp = ast_strdupa(data);
+	if (!(temp = ast_strdupa(data))) {
+		LOCAL_USER_REMOVE(u);
+		return -1;
+	}
 
 	AST_STANDARD_APP_ARGS(args, temp);
 
@@ -265,7 +271,10 @@
 
 	LOCAL_USER_ADD(u);
 
-	temp = ast_strdupa(data);
+	if (!(temp = ast_strdupa(data))) {
+		LOCAL_USER_REMOVE(u);
+		return -1;
+	}
 
 	AST_STANDARD_APP_ARGS(args, temp);
 

Modified: team/bweschke/bug_6047/apps/app_page.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/bug_6047/apps/app_page.c?rev=8450&r1=8449&r2=8450&view=diff
==============================================================================
--- team/bweschke/bug_6047/apps/app_page.c (original)
+++ team/bweschke/bug_6047/apps/app_page.c Sun Jan 22 17:45:10 2006
@@ -163,7 +163,10 @@
 		return -1;
 	};
 
-	options = ast_strdupa(data);
+	if (!(options = ast_strdupa(data))) {
+		LOCAL_USER_REMOVE(u);
+		return -1;
+	}
 
 	tmp = strsep(&options, "|");
 	if (options)

Modified: team/bweschke/bug_6047/apps/app_parkandannounce.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/bug_6047/apps/app_parkandannounce.c?rev=8450&r1=8449&r2=8450&view=diff
==============================================================================
--- team/bweschke/bug_6047/apps/app_parkandannounce.c (original)
+++ team/bweschke/bug_6047/apps/app_parkandannounce.c Sun Jan 22 17:45:10 2006
@@ -59,12 +59,21 @@
 
 static char *descrip =
 "  ParkAndAnnounce(announce:template|timeout|dial|[return_context]):\n"
-"Park a call into the parkinglot and announce the call over the console.\n"
-"announce template: colon separated list of files to announce, the word PARKED\n"
-"                   will be replaced by a say_digits of the ext the call is parked in\n"
-"timeout: time in seconds before the call returns into the return context.\n"
-"dial: The app_dial style resource to call to make the announcement. Console/dsp calls the console.\n"
-"return_context: the goto style label to jump the call back into after timeout. default=prio+1\n";
+"Park a call into the parkinglot and announce the call to another channel.\n"
+"\n"
+"announce template: Colon-separated list of files to announce.  The word PARKED\n"
+"                   will be replaced by a say_digits of the extension in which\n"
+"                   the call is parked.\n"
+"timeout:           Time in seconds before the call returns into the return\n"
+"                   context.\n"
+"dial:              The app_dial style resource to call to make the\n"
+"                   announcement.  Console/dsp calls the console.\n"
+"return_context:    The goto-style label to jump the call back into after\n"
+"                   timeout.  Default <priority+1>.\n"
+"\n"
+"The variable ${PARKEDAT} will contain the parking extension into which the\n"
+"call was placed.  Use with the Local channel to allow the dialplan to make\n"
+"use of this information.\n";
 
 
 STANDARD_LOCAL_USER;
@@ -79,6 +88,7 @@
 	char *working, *context, *exten, *priority, *dial, *dialtech, *dialstr;
 	char *template, *tpl_working, *tpl_current;
 	char *tmp[100];
+	char buf[13];
 	int looptemp=0,i=0;
 	char *s,*orig_s;
 
@@ -183,8 +193,10 @@
 
 	/* Now place the call to the extention */
 
+	snprintf(buf, sizeof(buf), "%d", lot);
 	memset(&oh, 0, sizeof(oh));
 	oh.parent_channel = chan;
+	oh.vars = ast_variable_new("_PARKEDAT", buf);
 	dchan = __ast_request_and_dial(dialtech, AST_FORMAT_SLINEAR, dialstr,30000, &outstate, chan->cid.cid_num, chan->cid.cid_name, &oh);
 
 	if(dchan) {

Modified: team/bweschke/bug_6047/apps/app_playback.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/bug_6047/apps/app_playback.c?rev=8450&r1=8449&r2=8450&view=diff
==============================================================================
--- team/bweschke/bug_6047/apps/app_playback.c (original)
+++ team/bweschke/bug_6047/apps/app_playback.c Sun Jan 22 17:45:10 2006
@@ -89,7 +89,8 @@
 		return -1;
 	}
 
-	tmp = ast_strdupa(data);
+	if (!(tmp = ast_strdupa(data)))
+		return -1;	
 
 	LOCAL_USER_ADD(u);
 	AST_STANDARD_APP_ARGS(args, tmp);

Modified: team/bweschke/bug_6047/apps/app_privacy.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/bug_6047/apps/app_privacy.c?rev=8450&r1=8449&r2=8450&view=diff
==============================================================================
--- team/bweschke/bug_6047/apps/app_privacy.c (original)
+++ team/bweschke/bug_6047/apps/app_privacy.c Sun Jan 22 17:45:10 2006
@@ -117,7 +117,10 @@
 
 		if (!ast_strlen_zero((char *)data))
 		{
-			parse = ast_strdupa(data);
+			if (!(parse = ast_strdupa(data))) {
+				LOCAL_USER_REMOVE(u);
+				return -1;
+			}
 			
 			AST_STANDARD_APP_ARGS(args, parse);
 

Modified: team/bweschke/bug_6047/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/bug_6047/apps/app_queue.c?rev=8450&r1=8449&r2=8450&view=diff
==============================================================================
--- team/bweschke/bug_6047/apps/app_queue.c (original)
+++ team/bweschke/bug_6047/apps/app_queue.c Sun Jan 22 17:45:10 2006
@@ -791,8 +791,7 @@
 
 /*!\brief Reload a single queue via realtime.
    \return Return the queue, or NULL if it doesn't exist.
-   \note Should be called with the global qlock locked.
-   When found, the queue is returned with q->lock locked. */
+   \note Should be called with the global qlock locked. */
 static struct ast_call_queue *find_queue_by_name_rt(const char *queuename, struct ast_variable *queue_vars, struct ast_config *member_config)
 {
 	struct ast_variable *v;
@@ -818,6 +817,7 @@
 				ast_mutex_unlock(&q->lock);
 				return NULL;
 			} else {
+				ast_mutex_unlock(&q->lock);
 				return q;
 			}
 		}
@@ -911,13 +911,60 @@
 		m = next_m;
 	}
 
+	ast_mutex_unlock(&q->lock);
+
 	return q;
 }
 
-static int join_queue(char *queuename, struct queue_ent *qe, enum queue_result *reason)
+static struct ast_call_queue *load_realtime_queue(char *queuename)
 {
 	struct ast_variable *queue_vars = NULL;
 	struct ast_config *member_config = NULL;
+	struct ast_call_queue *q;
+
+	/* Find the queue in the in-core list first. */
+	ast_mutex_lock(&qlock);
+	for (q = queues; q; q = q->next) {
+		if (!strcasecmp(q->name, queuename)) {
+			break;
+		}
+	}
+	ast_mutex_unlock(&qlock);
+
+	if (!q) {
+		/*! \note Load from realtime before taking the global qlock, to avoid blocking all
+		   queue operations while waiting for the DB.
+
+		   This will be two separate database transactions, so we might
+		   see queue parameters as they were before another process
+		   changed the queue and member list as it was after the change.
+		   Thus we might see an empty member list when a queue is
+		   deleted. In practise, this is unlikely to cause a problem. */
+
+		queue_vars = ast_load_realtime("queues", "name", queuename, NULL);
+		if (queue_vars) {
+			member_config = ast_load_realtime_multientry("queue_members", "interface LIKE", "%", "queue_name", queuename, NULL);
+			if (!member_config) {
+				ast_log(LOG_ERROR, "no queue_members defined in your config (extconfig.conf).\n");
+				return NULL;
+			}
+		}
+
+		ast_mutex_lock(&qlock);
+
+		q = find_queue_by_name_rt(queuename, queue_vars, member_config);
+		if (member_config)
+			ast_config_destroy(member_config);
+		if (queue_vars)
+			ast_variables_destroy(queue_vars);
+
+		ast_mutex_unlock(&qlock);
+	}
+	return q;
+}
+
+static int join_queue(char *queuename, struct queue_ent *qe, enum queue_result *reason)
+{
 	struct ast_call_queue *q;
 	struct queue_ent *cur, *prev = NULL;
 	int res = -1;
@@ -925,35 +972,12 @@
 	int inserted = 0;
 	enum queue_member_status stat;
 
-	/*! \note Load from realtime before taking the global qlock, to avoid blocking all
-	   queue operations while waiting for the DB.
-
-	   This will be two separate database transactions, so we might
-	   see queue parameters as they were before another process
-	   changed the queue and member list as it was after the change.
-	   Thus we might see an empty member list when a queue is
-	   deleted. In practise, this is unlikely to cause a problem. */
-	queue_vars = ast_load_realtime("queues", "name", queuename, NULL);
-	if (queue_vars) {
-		member_config = ast_load_realtime_multientry("queue_members", "interface LIKE", "%", "queue_name", queuename, NULL);
-		if (!member_config) {
-			ast_log(LOG_ERROR, "no queue_members defined in your config (extconfig.conf).\n");
-			return res;
-		}
-	}
+	q = load_realtime_queue(queuename);
+	if (!q)
+		return res;
 
 	ast_mutex_lock(&qlock);
-	q = find_queue_by_name_rt(queuename, queue_vars, member_config);
-	/* Note: If found, find_queue_by_name_rt() returns with q->lock locked. */
-	if(member_config)
-		ast_config_destroy(member_config);
-	if(queue_vars)
-		ast_variables_destroy(queue_vars);
-
-	if (!q) {
-		ast_mutex_unlock(&qlock);
-		return res;
-	}
+	ast_mutex_lock(&q->lock);
 
 	/* This is our one */
 	stat = get_member_status(q, qe->max_penalty);
@@ -2452,41 +2476,42 @@
 	struct member *new_member;
 	int res = RES_NOSUCHQUEUE;
 
+	/* \note Ensure the appropriate realtime queue is loaded.  Note that this
+	 * short-circuits if the queue is already in memory. */
+	q = load_realtime_queue(queuename);
+
 	ast_mutex_lock(&qlock);
-	for (q = queues ; q ; q = q->next) {
+
+	if (q) {
 		ast_mutex_lock(&q->lock);
-		if (!strcmp(q->name, queuename)) {
-			if (interface_exists(q, interface) == NULL) {
-				new_member = create_queue_member(interface, penalty, paused);
-
-				if (new_member != NULL) {
-					new_member->dynamic = 1;
-					new_member->next = q->members;
-					q->members = new_member;
-					manager_event(EVENT_FLAG_AGENT, "QueueMemberAdded",
-						"Queue: %s\r\n"
-						"Location: %s\r\n"
-						"Membership: %s\r\n"
-						"Penalty: %d\r\n"
-						"CallsTaken: %d\r\n"
-						"LastCall: %d\r\n"
-						"Status: %d\r\n"
-						"Paused: %d\r\n",
-					q->name, new_member->interface, new_member->dynamic ? "dynamic" : "static",
-					new_member->penalty, new_member->calls, (int)new_member->lastcall, new_member->status, new_member->paused);
+		if (interface_exists(q, interface) == NULL) {
+			new_member = create_queue_member(interface, penalty, paused);
+
+			if (new_member != NULL) {
+				new_member->dynamic = 1;
+				new_member->next = q->members;
+				q->members = new_member;
+				manager_event(EVENT_FLAG_AGENT, "QueueMemberAdded",
+					"Queue: %s\r\n"
+					"Location: %s\r\n"
+					"Membership: %s\r\n"
+					"Penalty: %d\r\n"
+					"CallsTaken: %d\r\n"
+					"LastCall: %d\r\n"
+					"Status: %d\r\n"
+					"Paused: %d\r\n",
+				q->name, new_member->interface, new_member->dynamic ? "dynamic" : "static",
+				new_member->penalty, new_member->calls, (int)new_member->lastcall, new_member->status, new_member->paused);
 					
-					if (dump)
-						dump_queue_members(q);
-
-					res = RES_OKAY;
-				} else {
-					res = RES_OUTOFMEMORY;
-				}
+				if (dump)
+					dump_queue_members(q);
+
+				res = RES_OKAY;
 			} else {
-				res = RES_EXISTS;
-			}
-			ast_mutex_unlock(&q->lock);
-			break;
+				res = RES_OUTOFMEMORY;
+			}
+		} else {
+			res = RES_EXISTS;
 		}
 		ast_mutex_unlock(&q->lock);
 	}
@@ -2645,7 +2670,10 @@
 
 	LOCAL_USER_ADD(u);
 
-	parse = ast_strdupa(data);
+	if (!(parse = ast_strdupa(data))) {
+		LOCAL_USER_REMOVE(u);
+		return -1;
+	}
 
 	AST_STANDARD_APP_ARGS(args, parse);
 
@@ -2697,7 +2725,10 @@
 
 	LOCAL_USER_ADD(u);
 
-	parse = ast_strdupa(data);
+	if (!(parse = ast_strdupa(data))) {
+		LOCAL_USER_REMOVE(u);
+		return -1;	
+	}
 
 	AST_STANDARD_APP_ARGS(args, parse);
 
@@ -2751,7 +2782,10 @@
 
 	LOCAL_USER_ADD(u);
 
-	parse = ast_strdupa(data);
+	if (!(parse = ast_strdupa(data))) {
+		LOCAL_USER_REMOVE(u);
+		return -1;
+	}
 
 	AST_STANDARD_APP_ARGS(args, parse);
 
@@ -2815,11 +2849,7 @@
 
 	LOCAL_USER_ADD(u);
 
-	if (!(parse = ast_strdupa(data))) {
-		ast_log(LOG_WARNING, "Memory Error!\n");
-		LOCAL_USER_REMOVE(u);
-		return -1;
-	}
+	parse = ast_strdupa(data);
 
 	AST_STANDARD_APP_ARGS(args, parse);
 
@@ -3403,7 +3433,13 @@
 	time(&now);
 	if ((!queue_show && argc != 2) || (queue_show && argc != 3))
 		return RESULT_SHOWUSAGE;
+
+	/* We only want to load realtime queues when a specific queue is asked for. */
+	if (queue_show)
+		load_realtime_queue(argv[2]);
+
 	ast_mutex_lock(&qlock);
+
 	q = queues;
 	if (!q) {	
 		ast_mutex_unlock(&qlock);

Modified: team/bweschke/bug_6047/apps/app_random.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/bug_6047/apps/app_random.c?rev=8450&r1=8449&r2=8450&view=diff
==============================================================================
--- team/bweschke/bug_6047/apps/app_random.c (original)
+++ team/bweschke/bug_6047/apps/app_random.c Sun Jan 22 17:45:10 2006
@@ -73,7 +73,10 @@
 	
 	LOCAL_USER_ADD(u);
 
-	s = ast_strdupa(data);
+	if (!(s = ast_strdupa(data))) {
+		LOCAL_USER_REMOVE(u);
+		return -1;
+	}
 
 	prob = strsep(&s,":");
 	if ((!prob) || (sscanf(prob, "%d", &probint) != 1))

Modified: team/bweschke/bug_6047/apps/app_read.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/bug_6047/apps/app_read.c?rev=8450&r1=8449&r2=8450&view=diff
==============================================================================
--- team/bweschke/bug_6047/apps/app_read.c (original)
+++ team/bweschke/bug_6047/apps/app_read.c Sun Jan 22 17:45:10 2006
@@ -117,7 +117,10 @@
 
 	LOCAL_USER_ADD(u);
 	
-	argcopy = ast_strdupa(data);
+	if (!(argcopy = ast_strdupa(data))) {
+		LOCAL_USER_REMOVE(u);
+		return -1;
+	}
 
 	AST_STANDARD_APP_ARGS(arglist, argcopy);
 

Modified: team/bweschke/bug_6047/apps/app_readfile.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/bug_6047/apps/app_readfile.c?rev=8450&r1=8449&r2=8450&view=diff
==============================================================================
--- team/bweschke/bug_6047/apps/app_readfile.c (original)
+++ team/bweschke/bug_6047/apps/app_readfile.c Sun Jan 22 17:45:10 2006
@@ -73,7 +73,10 @@
 
 	LOCAL_USER_ADD(u);
 
-	s = ast_strdupa(data);
+	if (!(s = ast_strdupa(data))) {
+		LOCAL_USER_REMOVE(u);
+		return -1;
+	}
 
 	varname = strsep(&s, "=");
 	file = strsep(&s, "|");

Modified: team/bweschke/bug_6047/apps/app_record.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/bug_6047/apps/app_record.c?rev=8450&r1=8449&r2=8450&view=diff
==============================================================================
--- team/bweschke/bug_6047/apps/app_record.c (original)
+++ team/bweschke/bug_6047/apps/app_record.c Sun Jan 22 17:45:10 2006
@@ -116,7 +116,10 @@
 	LOCAL_USER_ADD(u);
 
 	/* Yay for strsep being easy */
-	vdata = ast_strdupa(data);
+	if (!(vdata = ast_strdupa(data))) {
+		LOCAL_USER_REMOVE(u);
+		return -1;
+	}
 
 	p = vdata;
 	filename = strsep(&p, "|");

Modified: team/bweschke/bug_6047/apps/app_sayunixtime.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/bug_6047/apps/app_sayunixtime.c?rev=8450&r1=8449&r2=8450&view=diff
==============================================================================
--- team/bweschke/bug_6047/apps/app_sayunixtime.c (original)
+++ team/bweschke/bug_6047/apps/app_sayunixtime.c Sun Jan 22 17:45:10 2006
@@ -92,20 +92,22 @@
 	} 
 
 	if (data) {
-		s = ast_strdupa(data);
-		timec = strsep(&s,"|");
-		if ((timec) && (*timec != '\0')) {
-			long timein;
-			if (sscanf(timec,"%ld",&timein) == 1) {
-				unixtime = (time_t)timein;
+		s = data;
+		if ((s = ast_strdupa(s))) {
+			timec = strsep(&s,"|");
+			if ((timec) && (*timec != '\0')) {
+				long timein;
+				if (sscanf(timec,"%ld",&timein) == 1) {
+					unixtime = (time_t)timein;
+				}
 			}
-		}
-		if (s) {
-			zone = strsep(&s,"|");
-			if (zone && (*zone == '\0'))
-				zone = NULL;
 			if (s) {
-				format = s;
+				zone = strsep(&s,"|");
+				if (zone && (*zone == '\0'))
+					zone = NULL;
+				if (s) {
+					format = s;
+				}
 			}
 		}
 	}

Modified: team/bweschke/bug_6047/apps/app_senddtmf.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/bug_6047/apps/app_senddtmf.c?rev=8450&r1=8449&r2=8450&view=diff
==============================================================================
--- team/bweschke/bug_6047/apps/app_senddtmf.c (original)
+++ team/bweschke/bug_6047/apps/app_senddtmf.c Sun Jan 22 17:45:10 2006
@@ -74,7 +74,10 @@
 
 	LOCAL_USER_ADD(u);
 
-	digits = ast_strdupa(data);
+	if (!(digits = ast_strdupa(data))) {
+		LOCAL_USER_REMOVE(u);
+		return -1;
+	}
 
 	if ((to = strchr(digits,'|'))) {
 		*to = '\0';

Modified: team/bweschke/bug_6047/apps/app_sendtext.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/bug_6047/apps/app_sendtext.c?rev=8450&r1=8449&r2=8450&view=diff
==============================================================================
--- team/bweschke/bug_6047/apps/app_sendtext.c (original)
+++ team/bweschke/bug_6047/apps/app_sendtext.c Sun Jan 22 17:45:10 2006
@@ -87,8 +87,12 @@
 		ast_log(LOG_WARNING, "SendText requires an argument (text[|options])\n");
 		LOCAL_USER_REMOVE(u);
 		return -1;
-	} else
-		parse = ast_strdupa(data);
+	} else {
+		if (!(parse = ast_strdupa(data))) {
+			LOCAL_USER_REMOVE(u);
+			return -1;
+		}
+	}
 	
 	AST_STANDARD_APP_ARGS(args, parse);
 

Modified: team/bweschke/bug_6047/apps/app_setcallerid.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/bug_6047/apps/app_setcallerid.c?rev=8450&r1=8449&r2=8450&view=diff
==============================================================================
--- team/bweschke/bug_6047/apps/app_setcallerid.c (original)
+++ team/bweschke/bug_6047/apps/app_setcallerid.c Sun Jan 22 17:45:10 2006
@@ -117,7 +117,10 @@
 	
 	LOCAL_USER_ADD(u);
 	
-	tmp = ast_strdupa(data);
+	if (!(tmp = ast_strdupa(data))) {
+		LOCAL_USER_REMOVE(u);
+		return -1;
+	}
 	
 	opt = strchr(tmp, '|');
 	if (opt) {

Modified: team/bweschke/bug_6047/apps/app_skel.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/bug_6047/apps/app_skel.c?rev=8450&r1=8449&r2=8450&view=diff
==============================================================================
--- team/bweschke/bug_6047/apps/app_skel.c (original)
+++ team/bweschke/bug_6047/apps/app_skel.c Sun Jan 22 17:45:10 2006
@@ -87,7 +87,10 @@
 	/* Do our thing here */
 
 	/* We need to make a copy of the input string if we are going to modify it! */
-	args = ast_strdupa(data);	
+	if (!(args = ast_strdupa(data))) {
+		LOCAL_USER_REMOVE(u);
+		return -1;
+	}
 	
 	if ((argc = ast_app_separate_args(args, '|', argv, sizeof(argv) / sizeof(argv[0])))) {
 		dummy = argv[0];

Modified: team/bweschke/bug_6047/apps/app_sql_postgres.c
URL: http://svn.digium.com/view/asterisk/team/bweschke/bug_6047/apps/app_sql_postgres.c?rev=8450&r1=8449&r2=8450&view=diff
==============================================================================
--- team/bweschke/bug_6047/apps/app_sql_postgres.c (original)
+++ team/bweschke/bug_6047/apps/app_sql_postgres.c Sun Jan 22 17:45:10 2006
@@ -21,7 +21,7 @@
  * \brief Connect to PostgreSQL
  *
  * \author Christos Ricudis <ricudis at itc.auth.gr>
- * 
+ *
  * \ingroup applications
  */
 
@@ -44,6 +44,7 @@
 #include "asterisk/linkedlists.h"
 #include "asterisk/chanvars.h"
 #include "asterisk/lock.h"
+#include "asterisk/utils.h"
 
 #include "libpq-fe.h"
 
@@ -53,65 +54,65 @@
 
 static char *synopsis = "Do several SQLy things";
 
-static char *descrip = 
+static char *descrip =
 "PGSQL():  Do several SQLy things\n"
 "Syntax:\n"
 "  PGSQL(Connect var option-string)\n"
 "    Connects to a database.  Option string contains standard PostgreSQL\n"
-"    parameters like host=, dbname=, user=.  Connection identifer returned\n"
-"    in ${var}\n"
+"    parameters like host=, dbname=, user=.  Connection identifier returned\n"
+"    in ${var}.\n"
 "  PGSQL(Query var ${connection_identifier} query-string)\n"
 "    Executes standard SQL query contained in query-string using established\n"
-"    connection identified by ${connection_identifier}. Reseult of query is\n"
-"    is stored in ${var}.\n"
+"    connection identified by ${connection_identifier}.  Result of query is\n"
+"    stored in ${var}.\n"
 "  PGSQL(Fetch statusvar ${result_identifier} var1 var2 ... varn)\n"
 "    Fetches a single row from a result set contained in ${result_identifier}.\n"
 "    Assigns returned fields to ${var1} ... ${varn}.  ${statusvar} is set TRUE\n"
-"    if additional rows exist in reseult set.\n"
+"    if additional rows exist in result set.\n"
 "  PGSQL(Clear ${result_identifier})\n"
-"    Frees memory and datastructures associated with result set.\n" 
+"    Frees memory and data structures associated with result set.\n"
 "  PGSQL(Disconnect ${connection_identifier})\n"
 "    Disconnects from named connection to PostgreSQL.\n" ;
 
 /*
 
-Syntax of SQL commands : 
+Syntax of SQL commands :
 
 	Connect var option-string
-	
-	Connects to a database using the option-string and stores the 
+
+	Connects to a database using the option-string and stores the
 	connection identifier in ${var}
-	
-	
+
+
 	Query var ${connection_identifier} query-string
-	
+
 	Submits query-string to database backend and stores the result
 	identifier in ${var}
-	
-	
+
+
 	Fetch statusvar ${result_identifier} var1 var2 var3 ... varn
-	
-	Fetches a row from the query and stores end-of-table status in 
-	${statusvar} and columns in ${var1}..${varn}
-	
-	
+
+	Fetches a row from the query and stores end-of-table status in
+	${statusvar} and columns in ${var1} ... ${varn}
+
+
 	Clear ${result_identifier}
 
 	Clears data structures associated with ${result_identifier}
-	
-	
+
+
 	Disconnect ${connection_identifier}
-	
+
 	Disconnects from named connection
-	
-	
-EXAMPLES OF USE : 
+
+
+EXAMPLES OF USE :
 
 exten => s,2,PGSQL(Connect connid host=localhost user=asterisk dbname=credit)
 exten => s,3,PGSQL(Query resultid ${connid} SELECT username,credit FROM credit WHERE callerid=${CALLERIDNUM})
 exten => s,4,PGSQL(Fetch fetchid ${resultid} datavar1 datavar2)
 exten => s,5,GotoIf(${fetchid}?6:8)
-exten => s,6,Festival("User ${datavar1} currently has credit balance of ${datavar2} dollars.")	
+exten => s,6,Festival("User ${datavar1} currently has credit balance of ${datavar2} dollars.")
 exten => s,7,Goto(s,4)
 exten => s,8,PGSQL(Clear ${resultid})
 exten => s,9,PGSQL(Disconnect ${connid})
@@ -122,384 +123,352 @@
 
 LOCAL_USER_DECL;
 

[... 5378 lines stripped ...]


More information about the svn-commits mailing list