[asterisk-commits] branch oej/t38passthrough r13322 - in /team/oej/t38passthrough: ./ apps/ cdr/...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Mar 17 01:11:39 MST 2006


Author: oej
Date: Fri Mar 17 02:11:19 2006
New Revision: 13322

URL: http://svn.digium.com/view/asterisk?rev=13322&view=rev
Log:
Update to trunk, since automerge obviously did not

Added:
    team/oej/t38passthrough/res/res_convert.c
      - copied unchanged from r13281, trunk/res/res_convert.c
Modified:
    team/oej/t38passthrough/   (props changed)
    team/oej/t38passthrough/UPGRADE.txt
    team/oej/t38passthrough/apps/app_dial.c
    team/oej/t38passthrough/apps/app_externalivr.c
    team/oej/t38passthrough/apps/app_meetme.c
    team/oej/t38passthrough/apps/app_queue.c
    team/oej/t38passthrough/apps/app_rpt.c
    team/oej/t38passthrough/apps/app_voicemail.c
    team/oej/t38passthrough/ast_expr2.c
    team/oej/t38passthrough/ast_expr2.fl
    team/oej/t38passthrough/ast_expr2.h
    team/oej/t38passthrough/ast_expr2.y
    team/oej/t38passthrough/ast_expr2f.c
    team/oej/t38passthrough/asterisk.c
    team/oej/t38passthrough/cdr.c
    team/oej/t38passthrough/cdr/cdr_sqlite.c
    team/oej/t38passthrough/channels/chan_iax2.c
    team/oej/t38passthrough/channels/chan_sip.c
    team/oej/t38passthrough/channels/chan_zap.c
    team/oej/t38passthrough/codecs/gsm/Makefile
    team/oej/t38passthrough/config.c
    team/oej/t38passthrough/configs/cdr.conf.sample
    team/oej/t38passthrough/configs/iax.conf.sample
    team/oej/t38passthrough/configs/sip.conf.sample
    team/oej/t38passthrough/contrib/utils/rawplayer.c
    team/oej/t38passthrough/doc/billing.txt
    team/oej/t38passthrough/doc/enum.txt
    team/oej/t38passthrough/doc/extconfig.txt
    team/oej/t38passthrough/doc/realtime.txt
    team/oej/t38passthrough/funcs/func_enum.c
    team/oej/t38passthrough/include/asterisk/options.h
    team/oej/t38passthrough/pbx.c
    team/oej/t38passthrough/res/res_features.c
    team/oej/t38passthrough/res/res_musiconhold.c
    team/oej/t38passthrough/say.c

Propchange: team/oej/t38passthrough/
------------------------------------------------------------------------------
Binary property 'branch-1.2-blocked' - no diff available.

Propchange: team/oej/t38passthrough/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Propchange: team/oej/t38passthrough/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Fri Mar 17 02:11:19 2006
@@ -1,1 +1,1 @@
-/trunk:1-12540
+/trunk:1-13321

Modified: team/oej/t38passthrough/UPGRADE.txt
URL: http://svn.digium.com/view/asterisk/team/oej/t38passthrough/UPGRADE.txt?rev=13322&r1=13321&r2=13322&view=diff
==============================================================================
--- team/oej/t38passthrough/UPGRADE.txt (original)
+++ team/oej/t38passthrough/UPGRADE.txt Fri Mar 17 02:11:19 2006
@@ -53,6 +53,15 @@
 * The ENUMLOOKUP() function with the 'c' option (for counting the number of records),
   but the lookup fails to match any records, the returned value will now be "0" instead of blank.
 
+The IAX2 channel:
+
+* The "mailboxdetail" option has been deprecated.  Previously, if this option
+  was not enabled, the 2 byte MSGCOUNT information element would be set to all
+  1's to indicate there there is some number of messages waiting.  With this
+  option enabled, the number of new messages were placed in one byte and the
+  number of old messages are placed in the other.  This is now the default
+  (and the only) behavior.
+
 The SIP channel:
 
 * The "incominglimit" setting is replaced by the "call-limit" setting in sip.conf.
@@ -66,3 +75,4 @@
 	ASTETCDIR	/usr/local/etc/asterisk
 	ASTBINDIR	/usr/local/bin/asterisk
 	ASTSBINDIR	/usr/local/sbin/asterisk
+

Modified: team/oej/t38passthrough/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/team/oej/t38passthrough/apps/app_dial.c?rev=13322&r1=13321&r2=13322&view=diff
==============================================================================
--- team/oej/t38passthrough/apps/app_dial.c (original)
+++ team/oej/t38passthrough/apps/app_dial.c Fri Mar 17 02:11:19 2006
@@ -1425,7 +1425,6 @@
 			}
 			ast_parseable_goto(chan, opt_args[OPT_ARG_GOTO]);
 			ast_parseable_goto(peer, opt_args[OPT_ARG_GOTO]);
-			peer->priority++;
 			ast_pbx_start(peer);
 			hanguptree(outgoing, NULL);
 			LOCAL_USER_REMOVE(u);

Modified: team/oej/t38passthrough/apps/app_externalivr.c
URL: http://svn.digium.com/view/asterisk/team/oej/t38passthrough/apps/app_externalivr.c?rev=13322&r1=13321&r2=13322&view=diff
==============================================================================
--- team/oej/t38passthrough/apps/app_externalivr.c (original)
+++ team/oej/t38passthrough/apps/app_externalivr.c Fri Mar 17 02:11:19 2006
@@ -65,7 +65,7 @@
 "will receive all DTMF events received on the channel, and notification\n"
 "if the channel is hung up. The application will not be forcibly terminated\n"
 "when the channel is hung up.\n"
-"See doc/README.externalivr for a protocol specification.\n";
+"See doc/externalivr.txt for a protocol specification.\n";
 
 /* XXX the parser in gcc 2.95 gets confused if you don't put a space between 'name' and the comma */
 #define ast_chan_log(level, channel, format, ...) ast_log(level, "%s: " format, channel->name , ## __VA_ARGS__)

Modified: team/oej/t38passthrough/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/team/oej/t38passthrough/apps/app_meetme.c?rev=13322&r1=13321&r2=13322&view=diff
==============================================================================
--- team/oej/t38passthrough/apps/app_meetme.c (original)
+++ team/oej/t38passthrough/apps/app_meetme.c Fri Mar 17 02:11:19 2006
@@ -71,18 +71,18 @@
 static const char *synopsis3 = "MeetMe conference Administration";
 
 static const char *descrip =
-"  MeetMe([confno][,[options][,pin]]): Enters the user into a specified MeetMe conference.\n"
-"If the conference number is omitted, the user will be prompted to enter\n"
-"one. \n"
-"User can exit the conference by hangup, or if the 'p' option is specified, by pressing '#'.\n"
+"  MeetMe([confno][,[options][,pin]]): Enters the user into a specified MeetMe\n"
+"conference.  If the conference number is omitted, the user will be prompted\n"
+"to enter one.  User can exit the conference by hangup, or if the 'p' option\n"
+"is specified, by pressing '#'.\n"
 "Please note: A ZAPTEL INTERFACE MUST BE INSTALLED FOR CONFERENCING TO WORK!\n\n"
 
 "The option string may contain zero or more of the following characters:\n"
 "      'a' -- set admin mode\n"
 "      'A' -- set marked mode\n"
 "      'b' -- run AGI script specified in ${MEETME_AGI_BACKGROUND}\n"
-"             Default: conf-background.agi\n"
-"             (Note: This does not work with non-Zap channels in the same conference)\n"
+"             Default: conf-background.agi  (Note: This does not work with\n"
+"             non-Zap channels in the same conference)\n"
 "      'c' -- announce user(s) count on joining a conference\n"
 "      'd' -- dynamically add conference\n"
 "      'D' -- dynamically add conference, prompting for a PIN\n"
@@ -91,31 +91,34 @@
 "      'i' -- announce user join/leave\n"
 "      'm' -- set monitor only mode (Listen only, no talking)\n"
 "      'M' -- enable music on hold when the conference has a single caller\n"
+"      'o' -- set talker optimization - treats talkers who aren't speaking as\n"
+"             being muted, meaning (a) No encode is done on transmission and\n"
+"             (b) Received audio that is not registered as talking is omitted\n"
+"             causing no buildup in background noise\n"
 "      'p' -- allow user to exit the conference by pressing '#'\n"
 "      'P' -- always prompt for the pin even if it is specified\n"
 "      'q' -- quiet mode (don't play enter/leave sounds)\n"
 "      'r' -- Record conference (records as ${MEETME_RECORDINGFILE}\n"
 "             using format ${MEETME_RECORDINGFORMAT}). Default filename is\n"
-"             meetme-conf-rec-${CONFNO}-${UNIQUEID} and the default format is wav.\n"
+"             meetme-conf-rec-${CONFNO}-${UNIQUEID} and the default format is\n"
+"             wav.\n"
 "      's' -- Present menu (user or admin) when '*' is received ('send' to menu)\n"
 "      't' -- set talk only mode. (Talk only, no listening)\n"
 "      'T' -- set talker detection (sent to manager interface and meetme list)\n"
-"      'o' -- set talker optimization - treats talkers who aren't speaking as\n"
-"             being muted, meaning (a) No encode is done on transmission and\n"
-"             (b) Received audio that is not registered as talking is omitted\n"
-"             causing no buildup in background noise\n"
 "      'v' -- video mode\n"
 "      'w' -- wait until the marked user enters the conference\n"
 "      'x' -- close the conference when last marked user exits\n"
 "      'X' -- allow user to exit the conference by entering a valid single\n"
 "             digit extension ${MEETME_EXIT_CONTEXT} or the current context\n"
-"             if that variable is not defined.\n";
+"             if that variable is not defined.\n"
+"      '1' -- do not play message when first person enters\n";
 
 static const char *descrip2 =
 "  MeetMeCount(confno[|var]): Plays back the number of users in the specified\n"
 "MeetMe conference. If var is specified, playback will be skipped and the value\n"
-"will be returned in the variable. Upon app completion, MeetMeCount will hangup the\n"
-"channel, unless priority n+1 exists, in which case priority progress will continue.\n"
+"will be returned in the variable. Upon app completion, MeetMeCount will hangup\n"
+"the channel, unless priority n+1 exists, in which case priority progress will\n"
+"continue.\n"
 "A ZAPTEL INTERFACE MUST BE INSTALLED FOR CONFERENCING FUNCTIONALITY.\n";
 
 static const char *descrip3 = 
@@ -148,6 +151,7 @@
 	struct ast_conf_user *firstuser;	/* Pointer to the first user struct */
 	struct ast_conf_user *lastuser;		/* Pointer to the last user struct */
 	time_t start;				/* Start time (s) */
+	int refcount;				/* reference count of usage */
 	unsigned int recording:2;				/* recording status */
 	unsigned int isdynamic:1;				/* Created on the fly? */
 	unsigned int locked:1;				/* Is the conference locked? */
@@ -244,31 +248,33 @@
 #define CONFFLAG_ALWAYSPROMPT (1 << 21)
 #define CONFFLAG_ANNOUNCEUSERCOUNT (1 << 22)	/* If set, when user joins the conference, they will be told the number of users that are already in */
 #define CONFFLAG_OPTIMIZETALKER (1 << 23)	/* If set, treats talking users as muted users */
+#define CONFFLAG_NOONLYPERSON (1 << 24)		/* If set, won't speak the extra prompt when the first person enters the conference */
 
 
 AST_APP_OPTIONS(meetme_opts, {
+	AST_APP_OPTION('A', CONFFLAG_MARKEDUSER ),
 	AST_APP_OPTION('a', CONFFLAG_ADMIN ),
+	AST_APP_OPTION('b', CONFFLAG_AGI ),
 	AST_APP_OPTION('c', CONFFLAG_ANNOUNCEUSERCOUNT ),
+	AST_APP_OPTION('D', CONFFLAG_DYNAMICPIN ),
+	AST_APP_OPTION('d', CONFFLAG_DYNAMIC ),
+	AST_APP_OPTION('E', CONFFLAG_EMPTYNOPIN ),
+	AST_APP_OPTION('e', CONFFLAG_EMPTY ),
+	AST_APP_OPTION('i', CONFFLAG_INTROUSER ),
+	AST_APP_OPTION('M', CONFFLAG_MOH ),
+	AST_APP_OPTION('m', CONFFLAG_MONITOR ),
+	AST_APP_OPTION('o', CONFFLAG_OPTIMIZETALKER ),
+	AST_APP_OPTION('P', CONFFLAG_ALWAYSPROMPT ),
+	AST_APP_OPTION('p', CONFFLAG_POUNDEXIT ),
+	AST_APP_OPTION('q', CONFFLAG_QUIET ),
+	AST_APP_OPTION('r', CONFFLAG_RECORDCONF ),
+	AST_APP_OPTION('s', CONFFLAG_STARMENU ),
 	AST_APP_OPTION('T', CONFFLAG_MONITORTALKER ),
-	AST_APP_OPTION('o', CONFFLAG_OPTIMIZETALKER ),
-	AST_APP_OPTION('i', CONFFLAG_INTROUSER ),
-	AST_APP_OPTION('m', CONFFLAG_MONITOR ),
-	AST_APP_OPTION('p', CONFFLAG_POUNDEXIT ),
-	AST_APP_OPTION('s', CONFFLAG_STARMENU ),
 	AST_APP_OPTION('t', CONFFLAG_TALKER ),
-	AST_APP_OPTION('q', CONFFLAG_QUIET ),
-	AST_APP_OPTION('M', CONFFLAG_MOH ),
+	AST_APP_OPTION('w', CONFFLAG_WAITMARKED ),
+	AST_APP_OPTION('X', CONFFLAG_EXIT_CONTEXT ),
 	AST_APP_OPTION('x', CONFFLAG_MARKEDEXIT ),
-	AST_APP_OPTION('X', CONFFLAG_EXIT_CONTEXT ),
-	AST_APP_OPTION('A', CONFFLAG_MARKEDUSER ),
-	AST_APP_OPTION('b', CONFFLAG_AGI ),
-	AST_APP_OPTION('w', CONFFLAG_WAITMARKED ),
-	AST_APP_OPTION('r', CONFFLAG_RECORDCONF ),
-	AST_APP_OPTION('d', CONFFLAG_DYNAMIC ),
-	AST_APP_OPTION('D', CONFFLAG_DYNAMICPIN ),
-	AST_APP_OPTION('e', CONFFLAG_EMPTY ),
-	AST_APP_OPTION('E', CONFFLAG_EMPTYNOPIN ),
-	AST_APP_OPTION('P', CONFFLAG_ALWAYSPROMPT ),
+	AST_APP_OPTION('1', CONFFLAG_NOONLYPERSON ),
 });
 
 static char *istalking(int x)
@@ -453,7 +459,7 @@
 		ast_autoservice_stop(chan);
 }
 
-static struct ast_conference *build_conf(char *confno, char *pin, char *pinadmin, int make, int dynamic)
+static struct ast_conference *build_conf(char *confno, char *pin, char *pinadmin, int make, int dynamic, int refcount)
 {
 	struct ast_conference *cnf;
 	struct zt_confinfo ztc;
@@ -473,6 +479,7 @@
 			ast_copy_string(cnf->confno, confno, sizeof(cnf->confno));
 			ast_copy_string(cnf->pin, pin, sizeof(cnf->pin));
 			ast_copy_string(cnf->pinadmin, pinadmin, sizeof(cnf->pinadmin));
+			cnf->refcount = 0;
 			cnf->markedusers = 0;
 			cnf->chan = ast_request("zap", AST_FORMAT_SLINEAR, "pseudo", NULL);
 			if (cnf->chan) {
@@ -529,6 +536,9 @@
 		} 
 	}
  cnfout:
+	if (cnf){ 
+		cnf->refcount += refcount;
+	}
 	AST_LIST_UNLOCK(&confs);
 	return cnf;
 }
@@ -859,6 +869,12 @@
 	char *buf = __buf + AST_FRIENDLY_OFFSET;
 
 	if (!(user = ast_calloc(1, sizeof(*user)))) {
+		AST_LIST_LOCK(&confs);
+		conf->refcount--;
+		if (!conf->refcount){
+			conf_free(conf);
+		}
+		AST_LIST_UNLOCK(&confs);
 		return ret;
 	}
 
@@ -944,7 +960,7 @@
 		ast_record_review(chan, "vm-rec-name", user->namerecloc, 10, "sln", &duration, NULL);
 	}
 
-	if (!(confflags & CONFFLAG_QUIET)) {
+	if ( !(confflags & (CONFFLAG_QUIET | CONFFLAG_NOONLYPERSON)) ) {
 		if (conf->users == 1 && !(confflags & CONFFLAG_WAITMARKED))
 			if (!ast_streamfile(chan, "conf-onlyperson", chan->language))
 				ast_waitstream(chan, "");
@@ -1671,14 +1687,17 @@
 		          "<no name>", hr, min, sec);
 
 		conf->users--;
+		conf->refcount--;
 		/* Update table */
 		snprintf(members, sizeof(members), "%d", conf->users);
 		ast_update_realtime("meetme", "confno", conf->confno, "members", members, NULL);
 		if (confflags & CONFFLAG_MARKEDUSER) 
 			conf->markedusers--;
 		if (!conf->users) {
-			/* No more users -- close this one out */
-			conf_free(conf);
+			/* close this one when no more users and no references*/
+			if (!conf->refcount){
+				conf_free(conf);
+			}
 		} else {
 			/* Remove the user struct */ 
 			if (user == conf->firstuser) {
@@ -1721,7 +1740,7 @@
 /*
   This function looks for a conference via the RealTime module
 */
-static struct ast_conference *find_conf_realtime(struct ast_channel *chan, char *confno, int make, int dynamic, char *dynamic_pin)
+static struct ast_conference *find_conf_realtime(struct ast_channel *chan, char *confno, int make, int dynamic, char *dynamic_pin, int refcount)
 {
 
 	struct ast_variable *var;
@@ -1732,6 +1751,9 @@
 	AST_LIST_TRAVERSE(&confs, cnf, list) {
 		if (!strcmp(confno, cnf->confno)) 
 			break;
+	}
+	if (cnf){
+		cnf->refcount += refcount;
 	}
 	AST_LIST_UNLOCK(&confs);
 
@@ -1757,14 +1779,14 @@
 		}
 		ast_variables_destroy(var);
 
-		cnf = build_conf(confno, pin ? pin : "", pinadmin ? pinadmin : "", make, dynamic);
+		cnf = build_conf(confno, pin ? pin : "", pinadmin ? pinadmin : "", make, dynamic, refcount);
 	}
 
 	return cnf;
 }
 
 
-static struct ast_conference *find_conf(struct ast_channel *chan, char *confno, int make, int dynamic, char *dynamic_pin)
+static struct ast_conference *find_conf(struct ast_channel *chan, char *confno, int make, int dynamic, char *dynamic_pin, int refcount)
 {
 	struct ast_config *cfg;
 	struct ast_variable *var;
@@ -1782,6 +1804,9 @@
 		if (!strcmp(confno, cnf->confno)) 
 			break;
 	}
+	if (cnf){
+		cnf->refcount += refcount;
+	}
 	AST_LIST_UNLOCK(&confs);
 
 	if (!cnf) {
@@ -1794,9 +1819,9 @@
 					if (ast_app_getdata(chan, "conf-getpin", dynamic_pin, AST_MAX_EXTENSION - 1, 0) < 0)
 						return NULL;
 				}
-				cnf = build_conf(confno, dynamic_pin, "", make, dynamic);
+				cnf = build_conf(confno, dynamic_pin, "", make, dynamic, refcount);
 			} else {
-				cnf = build_conf(confno, "", "", make, dynamic);
+				cnf = build_conf(confno, "", "", make, dynamic, refcount);
 			}
 		} else {
 			/* Check the config */
@@ -1818,14 +1843,14 @@
 					/* Bingo it's a valid conference */
 					if (args.pin) {
 						if (args.pinadmin)
-							cnf = build_conf(args.confno, args.pin, args.pinadmin, make, dynamic);
+							cnf = build_conf(args.confno, args.pin, args.pinadmin, make, dynamic, refcount);
 						else
-							cnf = build_conf(args.confno, args.pin, "", make, dynamic);
+							cnf = build_conf(args.confno, args.pin, "", make, dynamic, refcount);
 					} else {
 						if (args.pinadmin)
-							cnf = build_conf(args.confno, "", args.pinadmin, make, dynamic);
+							cnf = build_conf(args.confno, "", args.pinadmin, make, dynamic, refcount);
 						else
-							cnf = build_conf(args.confno, "", "", make, dynamic);
+							cnf = build_conf(args.confno, "", "", make, dynamic, refcount);
 					}
 					break;
 				}
@@ -1874,7 +1899,7 @@
 
 	AST_STANDARD_APP_ARGS(args, localdata);
 	
-	conf = find_conf(chan, args.confno, 0, 0, NULL);
+	conf = find_conf(chan, args.confno, 0, 0, NULL, 0);
 	if (conf)
 		count = conf->users;
 	else
@@ -2060,9 +2085,9 @@
 		}
 		if (!ast_strlen_zero(confno)) {
 			/* Check the validity of the conference */
-			cnf = find_conf(chan, confno, 1, dynamic, the_pin);
+			cnf = find_conf(chan, confno, 1, dynamic, the_pin, 1);
 			if (!cnf) {
-				cnf = find_conf_realtime(chan, confno, 1, dynamic, the_pin);
+				cnf = find_conf_realtime(chan, confno, 1, dynamic, the_pin, 1);
 			}
 			if (!cnf) {
 				res = ast_streamfile(chan, "conf-invalid", chan->language);
@@ -2104,8 +2129,15 @@
 								res = ast_streamfile(chan, "conf-invalidpin", chan->language);
 								if (!res)
 									ast_waitstream(chan, AST_DIGIT_ANY);
-								if (res < 0)
+								if (res < 0) {
+									AST_LIST_LOCK(&confs);
+									cnf->refcount--;
+									if (!cnf->refcount){
+										conf_free(cnf);
+									}
+									AST_LIST_UNLOCK(&confs);
 									break;
+								}
 								pin[0] = res;
 								pin[1] = '\0';
 								res = -1;
@@ -2118,8 +2150,9 @@
 							allowretry = 0;
 							/* see if we need to get rid of the conference */
 							AST_LIST_LOCK(&confs);
-							if (!cnf->users) {
-								conf_free(cnf);	
+							cnf->refcount--;
+							if (!cnf->refcount) {
+								conf_free(cnf);
 							}
 							AST_LIST_UNLOCK(&confs);
 							break;

Modified: team/oej/t38passthrough/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/team/oej/t38passthrough/apps/app_queue.c?rev=13322&r1=13321&r2=13322&view=diff
==============================================================================
--- team/oej/t38passthrough/apps/app_queue.c (original)
+++ team/oej/t38passthrough/apps/app_queue.c Fri Mar 17 02:11:19 2006
@@ -952,7 +952,7 @@
 	}
 	AST_LIST_UNLOCK(&queues);
 
-	if (!q) {
+	if (!q || q->realtime) {
 		/*! \note Load from realtime before taking the global qlock, to avoid blocking all
 		   queue operations while waiting for the DB.
 

Modified: team/oej/t38passthrough/apps/app_rpt.c
URL: http://svn.digium.com/view/asterisk/team/oej/t38passthrough/apps/app_rpt.c?rev=13322&r1=13321&r2=13322&view=diff
==============================================================================
--- team/oej/t38passthrough/apps/app_rpt.c (original)
+++ team/oej/t38passthrough/apps/app_rpt.c Fri Mar 17 02:11:19 2006
@@ -2010,7 +2010,7 @@
 	strncpy(mychannel->exten, myrpt->exten, sizeof(mychannel->exten) - 1);
 	strncpy(mychannel->context, myrpt->ourcontext, sizeof(mychannel->context) - 1);
 	if (myrpt->acctcode)
-		strncpy(mychannel->accountcode, myrpt->acctcode, sizeof(mychannel->accountcode) - 1);
+		ast_string_field_set(mychannel, accountcode, myrpt->acctcode);
 	mychannel->priority = 1;
 	ast_channel_undefer_dtmf(mychannel);
 	if (ast_pbx_start(mychannel) < 0)

Modified: team/oej/t38passthrough/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/oej/t38passthrough/apps/app_voicemail.c?rev=13322&r1=13321&r2=13322&view=diff
==============================================================================
--- team/oej/t38passthrough/apps/app_voicemail.c (original)
+++ team/oej/t38passthrough/apps/app_voicemail.c Fri Mar 17 02:11:19 2006
@@ -2207,10 +2207,9 @@
 	DIR *dir;
 	struct dirent *de;
 	char fn[256];
-	char tmp[256]="";
-	char *mb, *cur;
+	char tmp[256];
 	char *context;
-	int ret;
+
 	if (newmsgs)
 		*newmsgs = 0;
 	if (oldmsgs)
@@ -2220,9 +2219,10 @@
 		return 0;
 	if (strchr(mailbox, ',')) {
 		int tmpnew, tmpold;
+		char *mb, *cur;
+
 		ast_copy_string(tmp, mailbox, sizeof(tmp));
 		mb = tmp;
-		ret = 0;
 		while((cur = strsep(&mb, ", "))) {
 			if (!ast_strlen_zero(cur)) {
 				if (messagecount(cur, newmsgs ? &tmpnew : NULL, oldmsgs ? &tmpold : NULL))
@@ -5948,6 +5948,8 @@
 	char *fmt;
 	char *astemail;
  	char *astmailcmd = SENDMAIL;
+	char *astforcename;
+	char *astforcegreet;
 	char *s,*q,*stringp;
 	char *dialoutcxt = NULL;
 	char *callbackcxt = NULL;	
@@ -6119,14 +6121,14 @@
 		}
 
 		/* Force new user to record name ? */
-		if (!(astattach = ast_variable_retrieve(cfg, "general", "forcename"))) 
-			astattach = "no";
-		ast_set2_flag((&globalflags), ast_true(astattach), VM_FORCENAME);
+		if (!(astforcename = ast_variable_retrieve(cfg, "general", "forcename"))) 
+			astforcename = "no";
+		ast_set2_flag((&globalflags), ast_true(astforcename), VM_FORCENAME);
 
 		/* Force new user to record greetings ? */
-		if (!(astattach = ast_variable_retrieve(cfg, "general", "forcegreetings"))) 
-			astattach = "no";
-		ast_set2_flag((&globalflags), ast_true(astattach), VM_FORCEGREET);
+		if (!(astforcegreet = ast_variable_retrieve(cfg, "general", "forcegreetings"))) 
+			astforcegreet = "no";
+		ast_set2_flag((&globalflags), ast_true(astforcegreet), VM_FORCEGREET);
 
 		if ((s = ast_variable_retrieve(cfg, "general", "cidinternalcontexts"))){
 			ast_log(LOG_DEBUG,"VM_CID Internal context string: %s\n",s);

Modified: team/oej/t38passthrough/ast_expr2.c
URL: http://svn.digium.com/view/asterisk/team/oej/t38passthrough/ast_expr2.c?rev=13322&r1=13321&r2=13322&view=diff
==============================================================================
--- team/oej/t38passthrough/ast_expr2.c (original)
+++ team/oej/t38passthrough/ast_expr2.c Fri Mar 17 02:11:19 2006
@@ -1,7 +1,7 @@
-/* A Bison parser, made by GNU Bison 2.0.  */
+/* A Bison parser, made by GNU Bison 2.1.  */
 
 /* Skeleton parser for Yacc-like parsing with Bison,
-   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -15,8 +15,8 @@
 
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
+   Foundation, Inc., 51 Franklin Street, Fifth Floor,
+   Boston, MA 02110-1301, USA.  */
 
 /* As a special exception, when this file is copied by Bison into a
    Bison output file, you may use that output file without restriction.
@@ -35,6 +35,9 @@
 
 /* Identify Bison output.  */
 #define YYBISON 1
+
+/* Bison version.  */
+#define YYBISON_VERSION "2.1"
 
 /* Skeleton name.  */
 #define YYSKELETON_NAME "yacc.c"
@@ -84,6 +87,7 @@
      TOKEN = 278
    };
 #endif
+/* Tokens.  */
 #define TOK_COLONCOLON 258
 #define TOK_COND 259
 #define TOK_OR 260
@@ -142,10 +146,10 @@
 #include <asterisk/ast_expr.h>
 #include <asterisk/logger.h>
 
-#ifdef LONG_LONG_MIN
+#if defined(LONG_LONG_MIN) && !defined(QUAD_MIN)
 #define QUAD_MIN LONG_LONG_MIN
 #endif
-#ifdef LONG_LONG_MAX
+#if defined(LONG_LONG_MAX) && !defined(QUAD_MAX)
 #define QUAD_MAX LONG_LONG_MAX
 #endif
 
@@ -258,13 +262,18 @@
 # define YYERROR_VERBOSE 0
 #endif
 
+/* Enabling the token table.  */
+#ifndef YYTOKEN_TABLE
+# define YYTOKEN_TABLE 0
+#endif
+
 #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
 #line 142 "ast_expr2.y"
 typedef union YYSTYPE {
 	struct val *val;
 } YYSTYPE;
-/* Line 190 of yacc.c.  */
-#line 268 "ast_expr2.c"
+/* Line 196 of yacc.c.  */
+#line 277 "ast_expr2.c"
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
 # define YYSTYPE_IS_DECLARED 1
 # define YYSTYPE_IS_TRIVIAL 1
@@ -290,17 +299,36 @@
 extern int		ast_yylex __P((YYSTYPE *, YYLTYPE *, yyscan_t));
 
 
-/* Line 213 of yacc.c.  */
-#line 295 "ast_expr2.c"
+/* Line 219 of yacc.c.  */
+#line 304 "ast_expr2.c"
+
+#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
+# define YYSIZE_T __SIZE_TYPE__
+#endif
+#if ! defined (YYSIZE_T) && defined (size_t)
+# define YYSIZE_T size_t
+#endif
+#if ! defined (YYSIZE_T) && (defined (__STDC__) || defined (__cplusplus))
+# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+# define YYSIZE_T size_t
+#endif
+#if ! defined (YYSIZE_T)
+# define YYSIZE_T unsigned int
+#endif
+
+#ifndef YY_
+# if YYENABLE_NLS
+#  if ENABLE_NLS
+#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
+#   define YY_(msgid) dgettext ("bison-runtime", msgid)
+#  endif
+# endif
+# ifndef YY_
+#  define YY_(msgid) msgid
+# endif
+#endif
 
 #if ! defined (yyoverflow) || YYERROR_VERBOSE
-
-# ifndef YYFREE
-#  define YYFREE free
-# endif
-# ifndef YYMALLOC
-#  define YYMALLOC malloc
-# endif
 
 /* The parser invokes alloca or malloc; define the necessary symbols.  */
 
@@ -310,6 +338,10 @@
 #    define YYSTACK_ALLOC __builtin_alloca
 #   else
 #    define YYSTACK_ALLOC alloca
+#    if defined (__STDC__) || defined (__cplusplus)
+#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+#     define YYINCLUDED_STDLIB_H
+#    endif
 #   endif
 #  endif
 # endif
@@ -317,13 +349,39 @@
 # ifdef YYSTACK_ALLOC
    /* Pacify GCC's `empty if-body' warning. */
 #  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
+#  ifndef YYSTACK_ALLOC_MAXIMUM
+    /* The OS might guarantee only one guard page at the bottom of the stack,
+       and a page size can be as small as 4096 bytes.  So we cannot safely
+       invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
+       to allow for a few compiler-allocated temporary stack slots.  */
+#   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2005 */
+#  endif
 # else
-#  if defined (__STDC__) || defined (__cplusplus)
-#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-#   define YYSIZE_T size_t
-#  endif
 #  define YYSTACK_ALLOC YYMALLOC
 #  define YYSTACK_FREE YYFREE
+#  ifndef YYSTACK_ALLOC_MAXIMUM
+#   define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1)
+#  endif
+#  ifdef __cplusplus
+extern "C" {
+#  endif
+#  ifndef YYMALLOC
+#   define YYMALLOC malloc
+#   if (! defined (malloc) && ! defined (YYINCLUDED_STDLIB_H) \
+	&& (defined (__STDC__) || defined (__cplusplus)))
+void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
+#   endif
+#  endif
+#  ifndef YYFREE
+#   define YYFREE free
+#   if (! defined (free) && ! defined (YYINCLUDED_STDLIB_H) \
+	&& (defined (__STDC__) || defined (__cplusplus)))
+void free (void *); /* INFRINGES ON USER NAME SPACE */
+#   endif
+#  endif
+#  ifdef __cplusplus
+}
+#  endif
 # endif
 #endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
 
@@ -360,7 +418,7 @@
 #   define YYCOPY(To, From, Count)		\
       do					\
 	{					\
-	  register YYSIZE_T yyi;		\
+	  YYSIZE_T yyi;				\
 	  for (yyi = 0; yyi < (Count); yyi++)	\
 	    (To)[yyi] = (From)[yyi];		\
 	}					\
@@ -410,7 +468,7 @@
 #define YYUNDEFTOK  2
 #define YYMAXUTOK   278
 
-#define YYTRANSLATE(YYX) 						\
+#define YYTRANSLATE(YYX)						\
   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
 
 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
@@ -479,8 +537,8 @@
 };
 #endif
 
-#if YYDEBUG || YYERROR_VERBOSE
-/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
+/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
    First, the terminals, then, starting at YYNTOKENS, nonterminals. */
 static const char *const yytname[] =
 {
@@ -609,22 +667,6 @@
       26,    26,    26,    26,     3,    26
 };
 
-#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
-# define YYSIZE_T __SIZE_TYPE__
-#endif
-#if ! defined (YYSIZE_T) && defined (size_t)
-# define YYSIZE_T size_t
-#endif
-#if ! defined (YYSIZE_T)
-# if defined (__STDC__) || defined (__cplusplus)
-#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
-#  define YYSIZE_T size_t
-# endif
-#endif
-#if ! defined (YYSIZE_T)
-# define YYSIZE_T unsigned int
-#endif
-
 #define yyerrok		(yyerrstatus = 0)
 #define yyclearin	(yychar = YYEMPTY)
 #define YYEMPTY		(-2)
@@ -654,8 +696,8 @@
       goto yybackup;						\
     }								\
   else								\
-    { 								\
-      yyerror ("syntax error: cannot back up");\
+    {								\
+      yyerror (YY_("syntax error: cannot back up")); \
       YYERROR;							\
     }								\
 while (0)
@@ -734,7 +776,7 @@
   if (yydebug)							\
     {								\
       YYFPRINTF (stderr, "%s ", Title);				\
-      yysymprint (stderr, 					\
+      yysymprint (stderr,					\
                   Type, Value, Location);	\
       YYFPRINTF (stderr, "\n");					\
     }								\
@@ -782,13 +824,13 @@
 #endif
 {
   int yyi;
-  unsigned int yylno = yyrline[yyrule];
-  YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
+  unsigned long int yylno = yyrline[yyrule];
+  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu), ",
              yyrule - 1, yylno);
   /* Print the symbols being reduced, and their result.  */
   for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
-    YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
-  YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]);
+    YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
+  YYFPRINTF (stderr, "-> %s\n", yytname[yyr1[yyrule]]);
 }
 
 # define YY_REDUCE_PRINT(Rule)		\
@@ -817,7 +859,7 @@
    if the built-in stack extension method is used).
 
    Do not make this value too large; the results are undefined if
-   SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
+   YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
    evaluated with infinite-precision integer arithmetic.  */
 
 #ifndef YYMAXDEPTH
@@ -841,7 +883,7 @@
      const char *yystr;
 #   endif
 {
-  register const char *yys = yystr;
+  const char *yys = yystr;
 
   while (*yys++ != '\0')
     continue;
@@ -866,8 +908,8 @@
      const char *yysrc;
 #   endif
 {
-  register char *yyd = yydest;
-  register const char *yys = yysrc;
+  char *yyd = yydest;
+  const char *yys = yysrc;
 
   while ((*yyd++ = *yys++) != '\0')
     continue;
@@ -877,7 +919,55 @@
 #  endif
 # endif
 
-#endif /* !YYERROR_VERBOSE */
+# ifndef yytnamerr
+/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
+   quotes and backslashes, so that it's suitable for yyerror.  The
+   heuristic is that double-quoting is unnecessary unless the string
+   contains an apostrophe, a comma, or backslash (other than
+   backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
+   null, do not copy; instead, return the length of what the result
+   would have been.  */
+static YYSIZE_T
+yytnamerr (char *yyres, const char *yystr)
+{
+  if (*yystr == '"')
+    {
+      size_t yyn = 0;
+      char const *yyp = yystr;
+
+      for (;;)
+	switch (*++yyp)
+	  {
+	  case '\'':
+	  case ',':
+	    goto do_not_strip_quotes;
+
+	  case '\\':
+	    if (*++yyp != '\\')
+	      goto do_not_strip_quotes;
+	    /* Fall through.  */
+	  default:
+	    if (yyres)
+	      yyres[yyn] = *yyp;
+	    yyn++;
+	    break;
+
+	  case '"':
+	    if (yyres)
+	      yyres[yyn] = '\0';
+	    return yyn;
+	  }
+    do_not_strip_quotes: ;
+    }
+
+  if (! yyres)
+    return yystrlen (yystr);
+
+  return yystpcpy (yyres, yystr) - yyres;
+}
+# endif
+
+#endif /* YYERROR_VERBOSE */
 
 
 
@@ -908,7 +998,7 @@
     YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
 
   YY_LOCATION_PRINT (yyoutput, *yylocationp);
-  fprintf (yyoutput, ": ");
+  YYFPRINTF (yyoutput, ": ");
 
 # ifdef YYPRINT
   if (yytype < YYNTOKENS)
@@ -995,7 +1085,7 @@
 #else
 int
 yyparse ()
-
+    ;
 #endif
 #endif
 {
@@ -1010,8 +1100,8 @@
 /* Location data for the look-ahead symbol.  */
 YYLTYPE yylloc;
 
-  register int yystate;
-  register int yyn;
+  int yystate;
+  int yyn;
   int yyresult;
   /* Number of tokens to shift before error messages enabled.  */
   int yyerrstatus;
@@ -1029,12 +1119,12 @@
   /* The state stack.  */
   short int yyssa[YYINITDEPTH];
   short int *yyss = yyssa;
-  register short int *yyssp;
+  short int *yyssp;
 
   /* The semantic value stack.  */
   YYSTYPE yyvsa[YYINITDEPTH];
   YYSTYPE *yyvs = yyvsa;
-  register YYSTYPE *yyvsp;
+  YYSTYPE *yyvsp;
 
   /* The location stack.  */
   YYLTYPE yylsa[YYINITDEPTH];
@@ -1076,10 +1166,6 @@
   yylloc.first_line   = yylloc.last_line   = 1;
   yylloc.first_column = yylloc.last_column = 0;
 #endif
-
-
-  yyvsp[0] = yylval;
-    yylsp[0] = yylloc;
 
   goto yysetstate;
 
@@ -1113,7 +1199,7 @@
 	   data in use in that stack, in bytes.  This used to be a
 	   conditional around just the two extra args, but that might
 	   be undefined if yyoverflow is a macro.  */
-	yyoverflow ("parser stack overflow",
+	yyoverflow (YY_("memory exhausted"),
 		    &yyss1, yysize * sizeof (*yyssp),
 		    &yyvs1, yysize * sizeof (*yyvsp),
 		    &yyls1, yysize * sizeof (*yylsp),
@@ -1124,11 +1210,11 @@
       }
 #else /* no yyoverflow */
 # ifndef YYSTACK_RELOCATE
-      goto yyoverflowlab;
+      goto yyexhaustedlab;
 # else
       /* Extend the stack our own way.  */
       if (YYMAXDEPTH <= yystacksize)
-	goto yyoverflowlab;
+	goto yyexhaustedlab;
       yystacksize *= 2;
       if (YYMAXDEPTH < yystacksize)
 	yystacksize = YYMAXDEPTH;
@@ -1138,7 +1224,7 @@
 	union yyalloc *yyptr =
 	  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
 	if (! yyptr)
-	  goto yyoverflowlab;
+	  goto yyexhaustedlab;
 	YYSTACK_RELOCATE (yyss);
 	YYSTACK_RELOCATE (yyvs);
 	YYSTACK_RELOCATE (yyls);
@@ -1438,10 +1524,11 @@
     break;
 
 
+      default: break;
     }
 
-/* Line 1037 of yacc.c.  */
-#line 1445 "ast_expr2.c"
+/* Line 1126 of yacc.c.  */
+#line 1532 "ast_expr2.c"
 
   yyvsp -= yylen;
   yyssp -= yylen;
@@ -1480,11 +1567,35 @@
 
       if (YYPACT_NINF < yyn && yyn < YYLAST)
 	{
-	  YYSIZE_T yysize = 0;
 	  int yytype = YYTRANSLATE (yychar);
-	  const char* yyprefix;
-	  char *yymsg;
+	  YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
+	  YYSIZE_T yysize = yysize0;
+	  YYSIZE_T yysize1;
+	  int yysize_overflow = 0;
+	  char *yymsg = 0;
+#	  define YYERROR_VERBOSE_ARGS_MAXIMUM 5
+	  char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
 	  int yyx;
+
+#if 0
+	  /* This is so xgettext sees the translatable formats that are
+	     constructed on the fly.  */
+	  YY_("syntax error, unexpected %s");
+	  YY_("syntax error, unexpected %s, expecting %s");
+	  YY_("syntax error, unexpected %s, expecting %s or %s");
+	  YY_("syntax error, unexpected %s, expecting %s or %s or %s");
+	  YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
+#endif
+	  char *yyfmt;
+	  char const *yyf;
+	  static char const yyunexpected[] = "syntax error, unexpected %s";
+	  static char const yyexpecting[] = ", expecting %s";
+	  static char const yyor[] = " or %s";
+	  char yyformat[sizeof yyunexpected
+			+ sizeof yyexpecting - 1
+			+ ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
+			   * (sizeof yyor - 1))];
+	  char const *yyprefix = yyexpecting;
 
 	  /* Start YYX at -YYN if negative to avoid negative indexes in
 	     YYCHECK.  */
@@ -1493,48 +1604,68 @@
 	  /* Stay within bounds of both yycheck and yytname.  */
 	  int yychecklim = YYLAST - yyn;
 	  int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
-	  int yycount = 0;
-
-	  yyprefix = ", expecting ";
+	  int yycount = 1;
+
+	  yyarg[0] = yytname[yytype];
+	  yyfmt = yystpcpy (yyformat, yyunexpected);
+
 	  for (yyx = yyxbegin; yyx < yyxend; ++yyx)
 	    if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
 	      {
-		yysize += yystrlen (yyprefix) + yystrlen (yytname [yyx]);
-		yycount += 1;
-		if (yycount == 5)
+		if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
 		  {
-		    yysize = 0;
+		    yycount = 1;
+		    yysize = yysize0;
+		    yyformat[sizeof yyunexpected - 1] = '\0';
 		    break;
 		  }
+		yyarg[yycount++] = yytname[yyx];
+		yysize1 = yysize + yytnamerr (0, yytname[yyx]);
+		yysize_overflow |= yysize1 < yysize;
+		yysize = yysize1;
+		yyfmt = yystpcpy (yyfmt, yyprefix);
+		yyprefix = yyor;
 	      }
-	  yysize += (sizeof ("syntax error, unexpected ")
-		     + yystrlen (yytname[yytype]));
-	  yymsg = (char *) YYSTACK_ALLOC (yysize);
-	  if (yymsg != 0)
+
+	  yyf = YY_(yyformat);
+	  yysize1 = yysize + yystrlen (yyf);
+	  yysize_overflow |= yysize1 < yysize;
+	  yysize = yysize1;
+
+	  if (!yysize_overflow && yysize <= YYSTACK_ALLOC_MAXIMUM)
+	    yymsg = (char *) YYSTACK_ALLOC (yysize);
+	  if (yymsg)
 	    {
-	      char *yyp = yystpcpy (yymsg, "syntax error, unexpected ");
-	      yyp = yystpcpy (yyp, yytname[yytype]);
-
-	      if (yycount < 5)
+	      /* Avoid sprintf, as that infringes on the user's name space.
+		 Don't have undefined behavior even if the translation
+		 produced a string with the wrong number of "%s"s.  */
+	      char *yyp = yymsg;
+	      int yyi = 0;
+	      while ((*yyp = *yyf))
 		{
-		  yyprefix = ", expecting ";
-		  for (yyx = yyxbegin; yyx < yyxend; ++yyx)
-		    if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
-		      {
-			yyp = yystpcpy (yyp, yyprefix);
-			yyp = yystpcpy (yyp, yytname[yyx]);
-			yyprefix = " or ";
-		      }
+		  if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
+		    {
+		      yyp += yytnamerr (yyp, yyarg[yyi++]);
+		      yyf += 2;
+		    }
+		  else
+		    {
+		      yyp++;
+		      yyf++;
+		    }
 		}
 	      yyerror (yymsg);
 	      YYSTACK_FREE (yymsg);
 	    }
 	  else
-	    yyerror ("syntax error; also virtual memory exhausted");
+	    {
+	      yyerror (YY_("syntax error"));
+	      goto yyexhaustedlab;
+	    }
 	}
       else
 #endif /* YYERROR_VERBOSE */
-	yyerror ("syntax error");
+	yyerror (YY_("syntax error"));
     }
 
   yyerror_range[0] = yylloc;
@@ -1546,18 +1677,9 @@
 
       if (yychar <= YYEOF)
         {
-          /* If at end of input, pop the error token,
-	     then the rest of the stack, then return failure.  */
+	  /* Return failure if at end of input.  */
 	  if (yychar == YYEOF)
-	     for (;;)
-	       {
-                 yyerror_range[0] = *yylsp;
-		 YYPOPSTACK;
-		 if (yyssp == yyss)
-		   YYABORT;
-		 yydestruct ("Error: popping",
-                             yystos[*yyssp], yyvsp, yylsp);
-	       }
+	    YYABORT;
         }
       else
 	{
@@ -1576,12 +1698,11 @@
 `---------------------------------------------------*/
 yyerrorlab:
 
-#ifdef __GNUC__
-  /* Pacify GCC when the user code never invokes YYERROR and the label
-     yyerrorlab therefore never appears in user code.  */
+  /* Pacify compilers like GCC when the user code never invokes
+     YYERROR and the label yyerrorlab therefore never appears in user
+     code.  */
   if (0)
      goto yyerrorlab;
-#endif
 
   yyerror_range[0] = yylsp[1-yylen];
   yylsp -= yylen;
@@ -1651,23 +1772,29 @@
 | yyabortlab -- YYABORT comes here.  |
 `-----------------------------------*/
 yyabortlab:
-  yydestruct ("Error: discarding lookahead",
-              yytoken, &yylval, &yylloc);
-  yychar = YYEMPTY;
   yyresult = 1;
   goto yyreturn;
 
 #ifndef yyoverflow
-/*----------------------------------------------.
-| yyoverflowlab -- parser overflow comes here.  |

[... 923 lines stripped ...]


More information about the asterisk-commits mailing list