[svn-commits] branch oej/sipregister r8821 - in /team/oej/sipregister: ./ apps/ cdr/ channe...

svn-commits at lists.digium.com svn-commits at lists.digium.com
Sat Jan 28 07:38:57 MST 2006


Author: oej
Date: Sat Jan 28 08:38:43 2006
New Revision: 8821

URL: http://svn.digium.com/view/asterisk?rev=8821&view=rev
Log:
Merged revisions 8517,8523-8524,8531,8538-8539,8548,8554,8560-8561,8563,8571-8572,8574,8582,8587,8589-8597,8599,8609-8610,8618,8620,8633,8642-8643,8654,8664-8665,8667,8676,8678,8687,8697,8711-8712,8727-8728,8730-8731,8741-8742,8750,8757,8768,8778-8779,8786,8799 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
r8517 | oej | 2006-01-24 11:36:45 +0100 (Tue, 24 Jan 2006) | 2 lines

Whitespace change, extra <tab> added from my tab storage.

................
r8523 | oej | 2006-01-24 12:42:09 +0100 (Tue, 24 Jan 2006) | 2 lines

Declaring conn and result static to avoid collission with realtime driver (issue 6336, pressureman)

................
r8524 | oej | 2006-01-24 12:46:29 +0100 (Tue, 24 Jan 2006) | 3 lines

- Adding whitespace that I found unused outside 
- Adding "if (option_debug)" before outputting to DEBUG channel

................
r8531 | oej | 2006-01-24 13:48:44 +0100 (Tue, 24 Jan 2006) | 2 lines

- Report SIP reload in manager (issue 5742 with small changes)

................
r8538 | oej | 2006-01-24 14:21:13 +0100 (Tue, 24 Jan 2006) | 2 lines

Importing rev #8537 from 1.2, never send response to ACK (issue #6308)

................
r8539 | oej | 2006-01-24 14:53:45 +0100 (Tue, 24 Jan 2006) | 2 lines

Issue #6323, FreeBSD compatibility with compilation of func_odbc.c (reported by nulbyte)

................
r8548 | oej | 2006-01-24 18:47:41 +0100 (Tue, 24 Jan 2006) | 2 lines

Reverting change in revision 8539 - fixed wrong problem. Sorry.

................
r8554 | oej | 2006-01-24 19:15:20 +0100 (Tue, 24 Jan 2006) | 2 lines

Make it clear that caller ID in sip.conf is used only on incoming calls (inspired by bug #6183)

................
r8560 | oej | 2006-01-24 20:08:44 +0100 (Tue, 24 Jan 2006) | 2 lines

Issue #6093: Match realtime non-dynamic peers by IP. (siacali).

................
r8561 | oej | 2006-01-24 20:19:20 +0100 (Tue, 24 Jan 2006) | 2 lines

Issue 6114: Don't hangup on bye/also if there's no channel. (gst)

................
r8563 | oej | 2006-01-24 20:29:32 +0100 (Tue, 24 Jan 2006) | 2 lines

Blocking fix from 1.2 from being applied again. 

................
r8571 | russell | 2006-01-24 21:20:05 +0100 (Tue, 24 Jan 2006) | 2 lines

convert ast_channel list to use linked list macros (issue #6338)

................
r8572 | russell | 2006-01-24 21:27:09 +0100 (Tue, 24 Jan 2006) | 2 lines

store the list of 'atexit' functions using linked list macros (issue #6329)

................
r8574 | oej | 2006-01-24 21:41:08 +0100 (Tue, 24 Jan 2006) | 2 lines

Don't reset scheduled ID until we actually end the scheduled event.

................
r8582 | mattf | 2006-01-24 22:45:42 +0100 (Tue, 24 Jan 2006) | 2 lines

Updates from royk to safe_asterisk (#5207) Thanks!

................
r8587 | mattf | 2006-01-24 23:06:37 +0100 (Tue, 24 Jan 2006) | 2 lines

Make sure safe_asterisk retains previous script defaults

................
r8589 | kpfleming | 2006-01-24 23:33:58 +0100 (Tue, 24 Jan 2006) | 1 line


................
r8590 | kpfleming | 2006-01-24 23:34:06 +0100 (Tue, 24 Jan 2006) | 1 line


................
r8591 | kpfleming | 2006-01-24 23:38:17 +0100 (Tue, 24 Jan 2006) | 10 lines

Merged revisions 8588 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r8588 | kpfleming | 2006-01-24 16:32:09 -0600 (Tue, 24 Jan 2006) | 2 lines

ensure that channel cannot become zombie after we check but before we try to start indications

........

................
r8592 | kpfleming | 2006-01-24 23:40:20 +0100 (Tue, 24 Jan 2006) | 1 line


................
r8593 | kpfleming | 2006-01-24 23:40:57 +0100 (Tue, 24 Jan 2006) | 1 line


................
r8594 | kpfleming | 2006-01-24 23:41:45 +0100 (Tue, 24 Jan 2006) | 1 line


................
r8595 | kpfleming | 2006-01-24 23:42:43 +0100 (Tue, 24 Jan 2006) | 10 lines

Merged revisions 8173 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r8173 | russell | 2006-01-17 20:49:21 -0600 (Tue, 17 Jan 2006) | 2 lines

remove ChangeLog from the 1.2 branch.  It will only be present in the tags.

........

................
r8596 | kpfleming | 2006-01-24 23:43:30 +0100 (Tue, 24 Jan 2006) | 1 line


................
r8597 | kpfleming | 2006-01-24 23:43:57 +0100 (Tue, 24 Jan 2006) | 2 lines

clean up remaining already-merged revisions

................
r8599 | kpfleming | 2006-01-24 23:45:41 +0100 (Tue, 24 Jan 2006) | 2 lines

remove extraneous characters from property

................
r8609 | kpfleming | 2006-01-25 02:52:58 +0100 (Wed, 25 Jan 2006) | 10 lines

Merged revisions 8608 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r8608 | kpfleming | 2006-01-24 19:50:52 -0600 (Tue, 24 Jan 2006) | 2 lines

ensure hangup cause code is handled properly when channel does not return a frame (issue #6346)

........

................
r8610 | kpfleming | 2006-01-25 02:53:15 +0100 (Wed, 25 Jan 2006) | 1 line


................
r8618 | russell | 2006-01-25 06:37:29 +0100 (Wed, 25 Jan 2006) | 3 lines

don't leak almost 200 bytes for each new channel and store the active
channel list using the linked list macros (issue #6330)

................
r8620 | russell | 2006-01-25 06:39:25 +0100 (Wed, 25 Jan 2006) | 1 line


................
r8633 | oej | 2006-01-25 10:50:28 +0100 (Wed, 25 Jan 2006) | 2 lines

Issue #6349 - patch by markster, imported from 1.2

................
r8642 | oej | 2006-01-25 13:01:07 +0100 (Wed, 25 Jan 2006) | 3 lines

>From now on, apply maxexpiry and minexpiry to all subscriptions. Thanks to fourcheeze in the IRC channel
for pointing this out.

................
r8643 | oej | 2006-01-25 13:11:30 +0100 (Wed, 25 Jan 2006) | 3 lines

- Remove unused option to transmit_state_notify
- Allow for expiry=0 in subscription requests that only wants *one* update and that's it.

................
r8654 | kpfleming | 2006-01-25 15:52:43 +0100 (Wed, 25 Jan 2006) | 3 lines

don't queue a congestion frame on a channel that will be immediately hung up anyway
clean up/organize code block

................
r8664 | russell | 2006-01-25 19:12:55 +0100 (Wed, 25 Jan 2006) | 2 lines

store agent_pvt list using linked list macros (issue #6342)

................
r8665 | russell | 2006-01-25 19:24:32 +0100 (Wed, 25 Jan 2006) | 3 lines

store feature_pvt list using linked list macros
(issue #6351, with additional changes to prevent a memory leak in unload_module)

................
r8667 | russell | 2006-01-25 19:41:12 +0100 (Wed, 25 Jan 2006) | 1 line


................
r8676 | russell | 2006-01-25 20:06:37 +0100 (Wed, 25 Jan 2006) | 2 lines

use arg parsing macros in the AGENT dialplan function (issue #6236, with small mods)

................
r8678 | russell | 2006-01-25 20:16:14 +0100 (Wed, 25 Jan 2006) | 11 lines

Merged revisions 8677 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r8677 | russell | 2006-01-25 14:14:43 -0500 (Wed, 25 Jan 2006) | 3 lines

don't call ast_update_realtime with uninitialized variables if we get a
registration with an expirey of 0 seconds (issue #6173)

........

................
r8687 | russell | 2006-01-25 21:02:12 +0100 (Wed, 25 Jan 2006) | 2 lines

use arg parsing macros for WaitExten and Background (issue #6185)

................
r8697 | kpfleming | 2006-01-26 05:00:05 +0100 (Thu, 26 Jan 2006) | 4 lines

string field manager improvements:
use multiple memory blocks, instead of realloc(), ensuring that field pointers will never become invalid or change
don't run vs(n)printf twice when doing a field build unless required

................
r8711 | oej | 2006-01-26 15:44:23 +0100 (Thu, 26 Jan 2006) | 10 lines

Merged revisions 8710 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r8710 | oej | 2006-01-26 15:39:36 +0100 (Thu, 26 Jan 2006) | 2 lines

Issue 5898: Registrations does not get deleted if there's an active SIP dialog

........

................
r8712 | oej | 2006-01-26 15:59:33 +0100 (Thu, 26 Jan 2006) | 2 lines

Add some debugging output when reloading, to be able to follow progress at high debug levels

................
r8727 | russell | 2006-01-26 20:33:27 +0100 (Thu, 26 Jan 2006) | 2 lines

store conference list using linked list macros (issue #6327)

................
r8728 | oej | 2006-01-26 20:38:11 +0100 (Thu, 26 Jan 2006) | 4 lines

Code clean up, inspired by rizzo's comments in issue 5978. 
- Don't check for ignore if ignore is always negative
- Add comments to explain what's going on

................
r8730 | russell | 2006-01-26 20:44:16 +0100 (Thu, 26 Jan 2006) | 10 lines

Merged revisions 8729 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r8729 | russell | 2006-01-26 14:42:35 -0500 (Thu, 26 Jan 2006) | 2 lines

fix problem with dtmf on e&m (issue #6364)

........

................
r8731 | oej | 2006-01-26 20:47:40 +0100 (Thu, 26 Jan 2006) | 2 lines

Issue #5954 revisited. Thanks rizzo.

................
r8741 | oej | 2006-01-26 21:08:53 +0100 (Thu, 26 Jan 2006) | 2 lines

Formatting fixes, speling eror fiksd ;-)

................
r8742 | russell | 2006-01-26 21:28:52 +0100 (Thu, 26 Jan 2006) | 2 lines

don't redefine the localuser struct for additional use specific to the module (issue #6216)

................
r8750 | oej | 2006-01-26 22:36:41 +0100 (Thu, 26 Jan 2006) | 9 lines

- Move two functions to static that wasn't for some reason
- Add doxygen comments
- Remove un-needed assignment at declaration of variable
- Formatting fixes (whitespace)
- Add optin_debug in front of complex debugging output
- Move forward declarations of functions to top of file
- Fix error message for bad allocation in sip registry 
(Note: Review to line 6050 in this too large file)

................
r8757 | russell | 2006-01-27 01:31:05 +0100 (Fri, 27 Jan 2006) | 2 lines

don't re-define the localuser struct for custom use inside the module (issue #6216)

................
r8768 | tilghman | 2006-01-27 02:04:03 +0100 (Fri, 27 Jan 2006) | 11 lines


Merged revisions 8758 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r8758 | tilghman | 2006-01-26 18:52:12 -0600 (Thu, 26 Jan 2006) | 2 lines

Bug 6072 - Revisions to the source bison and flex files don't auto-regenerate these files

........

................
r8778 | russell | 2006-01-27 06:33:20 +0100 (Fri, 27 Jan 2006) | 2 lines

add /usr/local/lib to SOLINK (issue #6323)

................
r8779 | russell | 2006-01-27 06:39:20 +0100 (Fri, 27 Jan 2006) | 2 lines

remove some more redundant flags

................
r8786 | oej | 2006-01-27 09:07:43 +0100 (Fri, 27 Jan 2006) | 10 lines

Merged revisions 8785 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r8785 | oej | 2006-01-27 09:02:16 +0100 (Fri, 27 Jan 2006) | 2 lines

Issue 6362 - Register without Contact: and Expires: fails (reporter: op)

........

................
r8799 | mattf | 2006-01-28 00:55:37 +0100 (Sat, 28 Jan 2006) | 2 lines

Add rdnis rx/tx support to chan_iax2 (#6348)

................

Removed:
    team/oej/sipregister/ChangeLog
Modified:
    team/oej/sipregister/   (props changed)
    team/oej/sipregister/Makefile
    team/oej/sipregister/apps/app_dial.c
    team/oej/sipregister/apps/app_externalivr.c
    team/oej/sipregister/apps/app_meetme.c
    team/oej/sipregister/ast_expr2.c
    team/oej/sipregister/ast_expr2.h
    team/oej/sipregister/ast_expr2f.c
    team/oej/sipregister/asterisk.c
    team/oej/sipregister/cdr/cdr_pgsql.c
    team/oej/sipregister/channel.c
    team/oej/sipregister/channels/chan_agent.c
    team/oej/sipregister/channels/chan_features.c
    team/oej/sipregister/channels/chan_iax2.c
    team/oej/sipregister/channels/chan_sip.c
    team/oej/sipregister/channels/chan_zap.c
    team/oej/sipregister/configs/sip.conf.sample
    team/oej/sipregister/contrib/scripts/safe_asterisk
    team/oej/sipregister/include/asterisk/channel.h
    team/oej/sipregister/include/asterisk/stringfields.h
    team/oej/sipregister/pbx.c
    team/oej/sipregister/res/Makefile
    team/oej/sipregister/rtp.c
    team/oej/sipregister/utils.c
    team/oej/sipregister/utils/astman.c

Propchange: team/oej/sipregister/
------------------------------------------------------------------------------
--- svnmerge-blocked (original)
+++ svnmerge-blocked Sat Jan 28 08:38:43 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,8394,8412,8418,8445
+/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,8124,8134,8394,8412,8414,8418,8429,8433,8445,8562,8573,8600,8619,8666

Propchange: team/oej/sipregister/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Sat Jan 28 08:38:43 2006
@@ -1,1 +1,1 @@
-/trunk:1-8515
+/trunk:1-8807

Modified: team/oej/sipregister/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/sipregister/Makefile?rev=8821&r1=8820&r2=8821&view=diff
==============================================================================
--- team/oej/sipregister/Makefile (original)
+++ team/oej/sipregister/Makefile Sat Jan 28 08:38:43 2006
@@ -381,6 +381,9 @@
 #These are used for all but Darwin
   ASTLINK=-Wl,-E 
   SOLINK=-shared -Xlinker -x
+  ifeq ($(findstring BSD,$(OSARCH)),BSD)
+    SOLINK+=-L$(CROSS_COMPILE_TARGET)/usr/local/lib
+  endif
 endif
 
 ifeq ($(OSARCH),FreeBSD)

Modified: team/oej/sipregister/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/team/oej/sipregister/apps/app_dial.c?rev=8821&r1=8820&r2=8821&view=diff
==============================================================================
--- team/oej/sipregister/apps/app_dial.c (original)
+++ team/oej/sipregister/apps/app_dial.c Sat Jan 28 08:38:43 2006
@@ -262,19 +262,20 @@
    use it not only for keeping track of what is in use but
    also for keeping track of who we're dialing. */
 
-struct localuser {
+struct dial_localuser {
 	struct ast_channel *chan;
 	unsigned int flags;
 	int forwards;
-	struct localuser *next;
+	struct dial_localuser *next;
 };
 
 LOCAL_USER_DECL;
-
-static void hanguptree(struct localuser *outgoing, struct ast_channel *exception)
+STANDARD_LOCAL_USER;
+
+static void hanguptree(struct dial_localuser *outgoing, struct ast_channel *exception)
 {
 	/* Hang up a tree of stuff */
-	struct localuser *oo;
+	struct dial_localuser *oo;
 	while (outgoing) {
 		/* Hangup any existing lines we have open */
 		if (outgoing->chan && (outgoing->chan != exception))
@@ -366,9 +367,9 @@
 			   dst->uniqueid);
 }
 
-static struct ast_channel *wait_for_answer(struct ast_channel *in, struct localuser *outgoing, int *to, struct ast_flags *peerflags, int *sentringing, char *status, size_t statussize, int busystart, int nochanstart, int congestionstart, int priority_jump, int *result)
+static struct ast_channel *wait_for_answer(struct ast_channel *in, struct dial_localuser *outgoing, int *to, struct ast_flags *peerflags, int *sentringing, char *status, size_t statussize, int busystart, int nochanstart, int congestionstart, int priority_jump, int *result)
 {
-	struct localuser *o;
+	struct dial_localuser *o;
 	int found;
 	int numlines;
 	int numbusy = busystart;
@@ -657,6 +658,7 @@
 					ast_hangup(o->chan);
 					o->chan = NULL;
 					ast_clear_flag(o, DIAL_STILLGOING);
+					HANDLE_CAUSE(in->hangupcause, in);
 				}
 			}
 			o = o->next;
@@ -735,7 +737,7 @@
 	char *tech, *number, *rest, *cur;
 	char privcid[256];
 	char privintro[1024];
-	struct localuser *outgoing=NULL, *tmp;
+	struct dial_localuser *outgoing=NULL, *tmp;
 	struct ast_channel *peer;
 	int to;
 	int numbusy = 0;

Modified: team/oej/sipregister/apps/app_externalivr.c
URL: http://svn.digium.com/view/asterisk/team/oej/sipregister/apps/app_externalivr.c?rev=8821&r1=8820&r2=8821&view=diff
==============================================================================
--- team/oej/sipregister/apps/app_externalivr.c (original)
+++ team/oej/sipregister/apps/app_externalivr.c Sat Jan 28 08:38:43 2006
@@ -75,9 +75,8 @@
 	char filename[1];
 };
 
-struct localuser {
+struct ivr_localuser {
 	struct ast_channel *chan;
-	struct localuser *next;
 	AST_LIST_HEAD(playlist, playlist_entry) playlist;
 	AST_LIST_HEAD(finishlist, playlist_entry) finishlist;
 	int abort_current_sound;
@@ -86,9 +85,10 @@
 };
 
 LOCAL_USER_DECL;
+STANDARD_LOCAL_USER;
 
 struct gen_state {
-	struct localuser *u;
+	struct ivr_localuser *u;
 	struct ast_filestream *stream;
 	struct playlist_entry *current;
 	int sample_queue;
@@ -111,7 +111,7 @@
 
 static void *gen_alloc(struct ast_channel *chan, void *params)
 {
-	struct localuser *u = params;
+	struct ivr_localuser *u = params;
 	struct gen_state *state;
 	
 	if (!(state = ast_calloc(1, sizeof(*state))))
@@ -143,7 +143,7 @@
 /* caller has the playlist locked */
 static int gen_nextfile(struct gen_state *state)
 {
-	struct localuser *u = state->u;
+	struct ivr_localuser *u = state->u;
 	char *file_to_stream;
 	
 	u->abort_current_sound = 0;
@@ -175,7 +175,7 @@
 static struct ast_frame *gen_readframe(struct gen_state *state)
 {
 	struct ast_frame *f = NULL;
-	struct localuser *u = state->u;
+	struct ivr_localuser *u = state->u;
 	
 	if (u->abort_current_sound ||
 	    (u->playing_silence && AST_LIST_FIRST(&u->playlist))) {
@@ -234,7 +234,7 @@
 {
 	struct playlist_entry *entry;
 	
-	if (!(entry = ast_calloc(1, sizeof(*entry) + strlen(filename) + 10)))
+	if (!(entry = ast_calloc(1, sizeof(*entry) + strlen(filename) + 10))) /* XXX why 10 ? */
 		return NULL;
 
 	strcpy(entry->filename, filename);
@@ -244,7 +244,7 @@
 
 static int app_exec(struct ast_channel *chan, void *data)
 {
-	struct localuser *u = NULL;
+	struct localuser *lu = NULL;
 	struct playlist_entry *entry;
 	const char *args = data;
 	int child_stdin[2] = { 0,0 };
@@ -259,8 +259,11 @@
 	FILE *child_commands = NULL;
 	FILE *child_errors = NULL;
 	FILE *child_events = NULL;
-
-	LOCAL_USER_ADD(u);
+	struct ivr_localuser foo, *u = &foo;
+
+	bzero(u, sizeof(*u));
+
+	LOCAL_USER_ADD(lu);
 	
 	AST_LIST_HEAD_INIT(&u->playlist);
 	AST_LIST_HEAD_INIT(&u->finishlist);
@@ -268,11 +271,12 @@
 	
 	if (ast_strlen_zero(args)) {
 		ast_log(LOG_WARNING, "ExternalIVR requires a command to execute\n");
-		goto exit;
+		LOCAL_USER_REMOVE(lu);
+		return -1;	
 	}
 
 	if (!(buf = ast_strdupa(data))) {
-		LOCAL_USER_REMOVE(u);
+		LOCAL_USER_REMOVE(lu);
 		return -1;
 	}
 
@@ -542,7 +546,7 @@
 	while ((entry = AST_LIST_REMOVE_HEAD(&u->playlist, list)))
 		free(entry);
 
-	LOCAL_USER_REMOVE(u);
+	LOCAL_USER_REMOVE(lu);
 
 	return res;
 }

Modified: team/oej/sipregister/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/team/oej/sipregister/apps/app_meetme.c?rev=8821&r1=8820&r2=8821&view=diff
==============================================================================
--- team/oej/sipregister/apps/app_meetme.c (original)
+++ team/oej/sipregister/apps/app_meetme.c Sat Jan 28 08:38:43 2006
@@ -136,7 +136,7 @@
 
 LOCAL_USER_DECL;
 
-static struct ast_conference {
+struct ast_conference {
 	ast_mutex_t playlock;				/* Conference specific lock (players) */
 	ast_mutex_t listenlock;				/* Conference specific lock (listeners) */
 	char confno[AST_MAX_EXTENSION];		/* Conference */
@@ -161,8 +161,10 @@
 	struct ast_frame *transframe[32];
 	struct ast_frame *origframe;
 	struct ast_trans_pvt *transpath[32];
-	struct ast_conference *next;
-} *confs;
+	AST_LIST_ENTRY(ast_conference) list;
+};
+
+static AST_LIST_HEAD_STATIC(confs, ast_conference);
 
 struct volume {
 	int desired;				/* Desired volume adjustment */
@@ -202,8 +204,6 @@
 	VOL_UP,
 	VOL_DOWN,
 };
-
-AST_MUTEX_DEFINE_STATIC(conflock);
 
 static int admin_exec(struct ast_channel *chan, void *data);
 static struct ast_frame null_frame = { AST_FRAME_NULL, };
@@ -432,7 +432,7 @@
 	if (!chan->_softhangup)
 		res = ast_autoservice_start(chan);
 
-	ast_mutex_lock(&conflock);
+	AST_LIST_LOCK(&confs);
 
 	switch(sound) {
 	case ENTER:
@@ -454,7 +454,7 @@
 		careful_write(conf->fd, (unsigned char *)data2, len << 1, 1);
 	}
 
-	ast_mutex_unlock(&conflock);
+	AST_LIST_UNLOCK(&confs);
 
 	if (!res) 
 		ast_autoservice_stop(chan);
@@ -465,9 +465,9 @@
 	struct ast_conference *cnf;
 	struct zt_confinfo ztc;
 
-	ast_mutex_lock(&conflock);
-
-	for (cnf = confs; cnf; cnf = cnf->next) {
+	AST_LIST_LOCK(&confs);
+
+	AST_LIST_TRAVERSE(&confs, cnf, list) {
 		if (!strcmp(confno, cnf->confno)) 
 			break;
 	}
@@ -532,12 +532,11 @@
 			cnf->locked = 0;
 			if (option_verbose > 2)
 				ast_verbose(VERBOSE_PREFIX_3 "Created MeetMe conference %d for conference '%s'\n", cnf->zapconf, cnf->confno);
-			cnf->next = confs;
-			confs = cnf;
+			AST_LIST_INSERT_HEAD(&confs, cnf, list);
 		} 
 	}
  cnfout:
-	ast_mutex_unlock(&conflock);
+	AST_LIST_UNLOCK(&confs);
 	return cnf;
 }
 
@@ -576,13 +575,12 @@
 	if (argc == 1) {
 		/* 'MeetMe': List all the conferences */	
 		now = time(NULL);
-		cnf = confs;
-		if (!cnf) {
+		if (AST_LIST_EMPTY(&confs)) {
 			ast_cli(fd, "No active MeetMe conferences.\n");
 			return RESULT_SUCCESS;
 		}
 		ast_cli(fd, header_format, "Conf Num", "Parties", "Marked", "Activity", "Creation");
-		while(cnf) {
+		AST_LIST_TRAVERSE(&confs, cnf, list) {
 			if (cnf->markedusers == 0)
 				strcpy(cmdline, "N/A ");
 			else 
@@ -594,7 +592,6 @@
 			ast_cli(fd, data_format, cnf->confno, cnf->users, cmdline, hr, min, sec, cnf->isdynamic ? "Dynamic" : "Static");
 
 			total += cnf->users; 	
-			cnf = cnf->next;
 		}
 		ast_cli(fd, "* Total number of MeetMe users: %d\n", total);
 		return RESULT_SUCCESS;
@@ -643,21 +640,18 @@
 		}	
 	} else if(strcmp(argv[1], "list") == 0) {
 		/* List all the users in a conference */
-		if (!confs) {
+		if (AST_LIST_EMPTY(&confs)) {
 			ast_cli(fd, "No active conferences.\n");
 			return RESULT_SUCCESS;	
 		}
-		cnf = confs;
 		/* Find the right conference */
-		while(cnf) {
+		AST_LIST_TRAVERSE(&confs, cnf, list) {
 			if (strcmp(cnf->confno, argv[2]) == 0)
 				break;
-			if (cnf->next) {
-				cnf = cnf->next;	
-			} else {
-				ast_cli(fd, "No such conference: %s.\n",argv[2]);
-				return RESULT_SUCCESS;
-			}
+		}
+		if (!cnf) {
+			ast_cli(fd, "No such conference: %s.\n",argv[2]);
+			return RESULT_SUCCESS;
 		}
 		/* Show all the users */
 		for (user = cnf->firstuser; user; user = user->nextuser){
@@ -709,16 +703,14 @@
 		}
 	} else if (pos == 2) {
 		/* Conference Number */
-		ast_mutex_lock(&conflock);
-		cnf = confs;
-		while(cnf) {
+		AST_LIST_LOCK(&confs);
+		AST_LIST_TRAVERSE(&confs, cnf, list) {
 			if (!strncasecmp(word, cnf->confno, strlen(word))) {
 				if (++which > state)
 					break;
 			}
-			cnf = cnf->next;
-		}
-		ast_mutex_unlock(&conflock);
+		}
+		AST_LIST_UNLOCK(&confs);
 		return cnf ? strdup(cnf->confno) : NULL;
 	} else if (pos == 3) {
 		/* User Number || Conf Command option*/
@@ -727,7 +719,7 @@
 				return strdup("all");
 			}
 			which++;
-			ast_mutex_lock(&conflock);
+			AST_LIST_LOCK(&confs);
 
 			/* TODO: Find the conf number from the cmdline (ignore spaces) <- test this and make it fail-safe! */
 			myline = ast_strdupa(line);
@@ -736,7 +728,7 @@
 					;
 			}
 			
-			for (cnf = confs; cnf; cnf = cnf->next) {
+			AST_LIST_TRAVERSE(&confs, cnf, list) {
 				if (!strcmp(confno, cnf->confno))
 				    break;
 			}
@@ -751,7 +743,7 @@
 					}
 				}
 			}
-			ast_mutex_unlock(&conflock);
+			AST_LIST_UNLOCK(&confs);
 			return usr ? strdup(usrno) : NULL;
 		}
 	}
@@ -798,32 +790,18 @@
    We assume that this was called while holding conflock. */
 static int conf_free(struct ast_conference *conf)
 {
-	struct ast_conference *prev = NULL, *cur = confs;
 	int x;
 	
-	while (cur) {
-		if (cur == conf) {
-			if (prev)
-				prev->next = conf->next;
-			else
-				confs = conf->next;
-			break;
-		}
-		prev = cur;
-		cur = cur->next;
-	}
-
-	if (!cur)
-		ast_log(LOG_WARNING, "Conference not found\n");
+	AST_LIST_REMOVE(&confs, conf, list);
 
 	if (conf->recording == MEETME_RECORD_ACTIVE) {
 		conf->recording = MEETME_RECORD_TERMINATE;
-		ast_mutex_unlock(&conflock);
+		AST_LIST_UNLOCK(&confs);
 		while (1) {
-			ast_mutex_lock(&conflock);
+			AST_LIST_LOCK(&confs);
 			if (conf->recording == MEETME_RECORD_OFF)
 				break;
-			ast_mutex_unlock(&conflock);
+			AST_LIST_UNLOCK(&confs);
 		}
 	}
 
@@ -1561,7 +1539,7 @@
 					if (ioctl(fd, ZT_SETCONF, &ztc)) {
 						ast_log(LOG_WARNING, "Error setting conference\n");
 						close(fd);
-						ast_mutex_unlock(&conflock);
+						AST_LIST_UNLOCK(&confs);
 						goto outrun;
 					}
 
@@ -1643,7 +1621,7 @@
 
 	reset_volumes(user);
 
-	ast_mutex_lock(&conflock);
+	AST_LIST_LOCK(&confs);
 	if (!(confflags & CONFFLAG_QUIET) && !(confflags & CONFFLAG_MONITOR) && !(confflags & CONFFLAG_ADMIN))
 		conf_play(chan, conf, LEAVE);
 
@@ -1658,10 +1636,10 @@
 			ast_filedelete(user->namerecloc, NULL);
 		}
 	}
-	ast_mutex_unlock(&conflock);
+	AST_LIST_UNLOCK(&confs);
 
  outrun:
-	ast_mutex_lock(&conflock);
+	AST_LIST_LOCK(&confs);
 
 	if (dsp)
 		ast_dsp_free(dsp);
@@ -1727,7 +1705,7 @@
 		pbx_builtin_setvar_helper(chan, "MEETMESECS", meetmesecs);
 	}
 	free(user);
-	ast_mutex_unlock(&conflock);
+	AST_LIST_UNLOCK(&confs);
 
 	return ret;
 }
@@ -1745,12 +1723,12 @@
 	);
 
 	/* Check first in the conference list */
-	ast_mutex_lock(&conflock);
-	for (cnf = confs; cnf; cnf = cnf->next) {
+	AST_LIST_LOCK(&confs);
+	AST_LIST_TRAVERSE(&confs, cnf, list) {
 		if (!strcmp(confno, cnf->confno)) 
 			break;
 	}
-	ast_mutex_unlock(&conflock);
+	AST_LIST_UNLOCK(&confs);
 
 	if (!cnf) {
 		if (dynamic) {
@@ -1928,15 +1906,15 @@
 			struct ast_variable *var;
 			int confno_int;
 
-			ast_mutex_lock(&conflock);
-			for (cnf = confs; cnf; cnf = cnf->next) {
+			AST_LIST_LOCK(&confs);
+			AST_LIST_TRAVERSE(&confs, cnf, list) {
 				if (sscanf(cnf->confno, "%d", &confno_int) == 1) {
 					/* Disqualify in use conference */
 					if (confno_int >= 0 && confno_int < 1024)
 						map[confno_int]++;
 				}
 			}
-			ast_mutex_unlock(&conflock);
+			AST_LIST_UNLOCK(&confs);
 
 			/* We only need to load the config file for static and empty_no_pin (otherwise we don't care) */
 			if ((empty_no_pin) || (!dynamic)) {
@@ -1958,17 +1936,15 @@
 								}
 								if (!dynamic) {
 									/* For static:  run through the list and see if this conference is empty */
-									ast_mutex_lock(&conflock);
-									cnf = confs;
-									while (cnf) {
+									AST_LIST_LOCK(&confs);
+									AST_LIST_TRAVERSE(&confs, cnf, list) {
 										if (!strcmp(confno_tmp, cnf->confno)) {
 											/* The conference exists, therefore it's not empty */
 											found = 1;
 											break;
 										}
-										cnf = cnf->next;
 									}
-									ast_mutex_unlock(&conflock);
+									AST_LIST_UNLOCK(&confs);
 									if (!found) {
 										/* At this point, we have a confno_tmp (static conference) that is empty */
 										if ((empty_no_pin && ((!stringp) || (stringp && (stringp[0] == '\0')))) || (!empty_no_pin)) {
@@ -2084,11 +2060,11 @@
 							res = -1;
 							allowretry = 0;
 							/* see if we need to get rid of the conference */
-							ast_mutex_lock(&conflock);
+							AST_LIST_LOCK(&confs);
 							if (!cnf->users) {
 								conf_free(cnf);	
 							}
-							ast_mutex_unlock(&conflock);
+							AST_LIST_UNLOCK(&confs);
 							break;
 						}
 
@@ -2145,7 +2121,7 @@
 	
 	LOCAL_USER_ADD(u);
 
-	ast_mutex_lock(&conflock);
+	AST_LIST_LOCK(&confs);
 	/* The param has the conference number the user and the command to execute */
 	if (!ast_strlen_zero(data)) {		
 		params = ast_strdupa((char *) data);
@@ -2154,11 +2130,11 @@
 
 		if (!args.command) {
 			ast_log(LOG_WARNING, "MeetmeAdmin requires a command!\n");
-			ast_mutex_unlock(&conflock);
+			AST_LIST_UNLOCK(&confs);
 			LOCAL_USER_REMOVE(u);
 			return -1;
 		}
-		for (cnf = confs; cnf; cnf = cnf->next) {
+		AST_LIST_TRAVERSE(&confs, cnf, list) {
 			if (!strcmp(cnf->confno, args.confno))
 				break;
 		}
@@ -2244,7 +2220,7 @@
 			ast_log(LOG_NOTICE, "Conference Number not found\n");
 		}
 	}
-	ast_mutex_unlock(&conflock);
+	AST_LIST_UNLOCK(&confs);
 
 	LOCAL_USER_REMOVE(u);
 	
@@ -2272,8 +2248,8 @@
 	cnf->recording = MEETME_RECORD_ACTIVE;
 	while (ast_waitfor(cnf->lchan, -1) > -1) {
 		if (cnf->recording == MEETME_RECORD_TERMINATE) {
-			ast_mutex_lock(&conflock);
-			ast_mutex_unlock(&conflock);
+			AST_LIST_LOCK(&confs);
+			AST_LIST_UNLOCK(&confs);
 			break;
 		}
 		if (!s && cnf->recordingfilename && (cnf->recordingfilename != oldrecordingfilename)) {

Modified: team/oej/sipregister/ast_expr2.c
URL: http://svn.digium.com/view/asterisk/team/oej/sipregister/ast_expr2.c?rev=8821&r1=8820&r2=8821&view=diff
==============================================================================
--- team/oej/sipregister/ast_expr2.c (original)
+++ team/oej/sipregister/ast_expr2.c Sat Jan 28 08:38:43 2006
@@ -1,4 +1,4 @@
-/* A Bison parser, made by GNU Bison 1.875d.  */
+/* A Bison parser, made by GNU Bison 2.0.  */
 
 /* Skeleton parser for Yacc-like parsing with Bison,
    Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
@@ -45,8 +45,7 @@
 /* Using locations.  */
 #define YYLSP_NEEDED 1
 
-/* If NAME_PREFIX is specified substitute the variables and functions
-   names.  */
+/* Substitute the variable and function names.  */
 #define yyparse ast_yyparse
 #define yylex   ast_yylex
 #define yyerror ast_yyerror
@@ -238,7 +237,12 @@
    some useful info about the error. Not as easy as it looks, but it
    is possible. */
 #define ast_yyerror(x) ast_yyerror(x,&yyloc,parseio)
-
+#define DESTROY(x) { \
+if ((x)->type == AST_EXPR_numeric_string || (x)->type == AST_EXPR_string) \
+	free((x)->u.s); \
+	(x)->u.s = 0; \
+	free(x); \
+}
 
 
 /* Enabling traces.  */
@@ -255,12 +259,12 @@
 #endif
 
 #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
-#line 137 "ast_expr2.y"
+#line 142 "ast_expr2.y"
 typedef union YYSTYPE {
 	struct val *val;
 } YYSTYPE;
-/* Line 191 of yacc.c.  */
-#line 264 "ast_expr2.c"
+/* Line 190 of yacc.c.  */
+#line 268 "ast_expr2.c"
 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
 # define YYSTYPE_IS_DECLARED 1
 # define YYSTYPE_IS_TRIVIAL 1
@@ -281,13 +285,13 @@
 
 
 /* Copy the second part of user declarations.  */
-#line 141 "ast_expr2.y"
+#line 146 "ast_expr2.y"
 
 extern int		ast_yylex __P((YYSTYPE *, YYLTYPE *, yyscan_t));
 
 
-/* Line 214 of yacc.c.  */
-#line 291 "ast_expr2.c"
+/* Line 213 of yacc.c.  */
+#line 295 "ast_expr2.c"
 
 #if ! defined (yyoverflow) || YYERROR_VERBOSE
 
@@ -302,14 +306,10 @@
 
 # ifdef YYSTACK_USE_ALLOCA
 #  if YYSTACK_USE_ALLOCA
-#   define YYSTACK_ALLOC alloca
-#  endif
-# else
-#  if defined (alloca) || defined (_ALLOCA_H)
-#   define YYSTACK_ALLOC alloca
-#  else
 #   ifdef __GNUC__
 #    define YYSTACK_ALLOC __builtin_alloca
+#   else
+#    define YYSTACK_ALLOC alloca
 #   endif
 #  endif
 # endif
@@ -473,9 +473,9 @@
 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
 static const unsigned char yyrline[] =
 {
-       0,   160,   160,   168,   169,   172,   175,   178,   181,   184,
-     187,   190,   193,   196,   199,   202,   205,   208,   211,   214,
-     217,   220,   223
+       0,   165,   165,   175,   176,   180,   184,   188,   192,   196,
+     200,   204,   208,   212,   216,   220,   224,   228,   232,   236,
+     240,   244,   248
 };
 #endif
 
@@ -660,19 +660,52 @@
     }								\
 while (0)
 
+
 #define YYTERROR	1
 #define YYERRCODE	256
 
-/* YYLLOC_DEFAULT -- Compute the default location (before the actions
-   are run).  */
-
+
+/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
+   If N is 0, then set CURRENT to the empty location which ends
+   the previous symbol: RHS[0] (always defined).  */
+
+#define YYRHSLOC(Rhs, K) ((Rhs)[K])
 #ifndef YYLLOC_DEFAULT
-# define YYLLOC_DEFAULT(Current, Rhs, N)		\
-   ((Current).first_line   = (Rhs)[1].first_line,	\
-    (Current).first_column = (Rhs)[1].first_column,	\
-    (Current).last_line    = (Rhs)[N].last_line,	\
-    (Current).last_column  = (Rhs)[N].last_column)
-#endif
+# define YYLLOC_DEFAULT(Current, Rhs, N)				\
+    do									\
+      if (N)								\
+	{								\
+	  (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;	\
+	  (Current).first_column = YYRHSLOC (Rhs, 1).first_column;	\
+	  (Current).last_line    = YYRHSLOC (Rhs, N).last_line;		\
+	  (Current).last_column  = YYRHSLOC (Rhs, N).last_column;	\
+	}								\
+      else								\
+	{								\
+	  (Current).first_line   = (Current).last_line   =		\
+	    YYRHSLOC (Rhs, 0).last_line;				\
+	  (Current).first_column = (Current).last_column =		\
+	    YYRHSLOC (Rhs, 0).last_column;				\
+	}								\
+    while (0)
+#endif
+
+
+/* YY_LOCATION_PRINT -- Print the location on the stream.
+   This macro was not mandated originally: define only if we know
+   we won't break user code: when these are the locations we know.  */
+
+#ifndef YY_LOCATION_PRINT
+# if YYLTYPE_IS_TRIVIAL
+#  define YY_LOCATION_PRINT(File, Loc)			\
+     fprintf (File, "%d.%d-%d.%d",			\
+              (Loc).first_line, (Loc).first_column,	\
+              (Loc).last_line,  (Loc).last_column)
+# else
+#  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+# endif
+#endif
+
 
 /* YYLEX -- calling `yylex' with the right arguments.  */
 
@@ -696,19 +729,13 @@
     YYFPRINTF Args;				\
 } while (0)
 
-# define YYDSYMPRINT(Args)			\
-do {						\
-  if (yydebug)					\
-    yysymprint Args;				\
-} while (0)
-
-# define YYDSYMPRINTF(Title, Token, Value, Location)		\
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)		\
 do {								\
   if (yydebug)							\
     {								\
       YYFPRINTF (stderr, "%s ", Title);				\
       yysymprint (stderr, 					\
-                  Token, Value, Location);	\
+                  Type, Value, Location);	\
       YYFPRINTF (stderr, "\n");					\
     }								\
 } while (0)
@@ -775,8 +802,7 @@
 int yydebug;
 #else /* !YYDEBUG */
 # define YYDPRINTF(Args)
-# define YYDSYMPRINT(Args)
-# define YYDSYMPRINTF(Title, Token, Value, Location)
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
 # define YY_STACK_PRINT(Bottom, Top)
 # define YY_REDUCE_PRINT(Rule)
 #endif /* !YYDEBUG */
@@ -793,10 +819,6 @@
    Do not make this value too large; the results are undefined if
    SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
    evaluated with infinite-precision integer arithmetic.  */
-
-#if defined (YYMAXDEPTH) && YYMAXDEPTH == 0
-# undef YYMAXDEPTH
-#endif
 
 #ifndef YYMAXDEPTH
 # define YYMAXDEPTH 10000
@@ -881,15 +903,17 @@
   (void) yylocationp;
 
   if (yytype < YYNTOKENS)
-    {
-      YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
-# ifdef YYPRINT
-      YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
-# endif
-    }
+    YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
   else
     YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
 
+  YY_LOCATION_PRINT (yyoutput, *yylocationp);
+  fprintf (yyoutput, ": ");
+
+# ifdef YYPRINT
+  if (yytype < YYNTOKENS)
+    YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
+# endif
   switch (yytype)
     {
       default:
@@ -905,10 +929,11 @@
 
 #if defined (__STDC__) || defined (__cplusplus)
 static void
-yydestruct (int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp)
+yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp)
 #else
 static void
-yydestruct (yytype, yyvaluep, yylocationp)
+yydestruct (yymsg, yytype, yyvaluep, yylocationp)
+    const char *yymsg;
     int yytype;
     YYSTYPE *yyvaluep;
     YYLTYPE *yylocationp;
@@ -917,6 +942,10 @@
   /* Pacify ``unused variable'' warnings.  */
   (void) yyvaluep;
   (void) yylocationp;
+
+  if (!yymsg)
+    yymsg = "Deleting";
+  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
 
   switch (yytype)
     {
@@ -970,15 +999,15 @@
 #endif
 #endif
 {
-  /* The lookahead symbol.  */
+  /* The look-ahead symbol.  */
 int yychar;
 
-/* The semantic value of the lookahead symbol.  */
+/* The semantic value of the look-ahead symbol.  */
 YYSTYPE yylval;
 
 /* Number of syntax errors so far.  */
 int yynerrs;
-/* Location data for the lookahead symbol.  */
+/* Location data for the look-ahead symbol.  */
 YYLTYPE yylloc;
 
   register int yystate;
@@ -986,7 +1015,7 @@
   int yyresult;
   /* Number of tokens to shift before error messages enabled.  */
   int yyerrstatus;
-  /* Lookahead token as an internal (translated) token number.  */
+  /* Look-ahead token as an internal (translated) token number.  */
   int yytoken = 0;
 
   /* Three stacks and their tools:
@@ -1011,7 +1040,8 @@
   YYLTYPE yylsa[YYINITDEPTH];
   YYLTYPE *yyls = yylsa;
   YYLTYPE *yylsp;
-  YYLTYPE *yylerrsp;
+  /* The locations where the error started and ended. */
+  YYLTYPE yyerror_range[2];
 
 #define YYPOPSTACK   (yyvsp--, yyssp--, yylsp--)
 
@@ -1041,6 +1071,15 @@
   yyssp = yyss;
   yyvsp = yyvs;
   yylsp = yyls;
+#if YYLTYPE_IS_TRIVIAL
+  /* Initialize the default location before parsing starts.  */
+  yylloc.first_line   = yylloc.last_line   = 1;
+  yylloc.first_column = yylloc.last_column = 0;
+#endif
+
+
+  yyvsp[0] = yylval;
+    yylsp[0] = yylloc;
 
   goto yysetstate;
 
@@ -1131,18 +1170,18 @@
 yybackup:
 
 /* Do appropriate processing given the current state.  */
-/* Read a lookahead token if we need one and don't already have one.  */
+/* Read a look-ahead token if we need one and don't already have one.  */
 /* yyresume: */
 
-  /* First try to decide what to do without reference to lookahead token.  */
+  /* First try to decide what to do without reference to look-ahead token.  */
 
   yyn = yypact[yystate];
   if (yyn == YYPACT_NINF)
     goto yydefault;
 
-  /* Not known => get a lookahead token if don't already have one.  */
-
-  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
+  /* Not known => get a look-ahead token if don't already have one.  */
+
+  /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol.  */
   if (yychar == YYEMPTY)
     {
       YYDPRINTF ((stderr, "Reading a token: "));
@@ -1157,7 +1196,7 @@
   else
     {
       yytoken = YYTRANSLATE (yychar);
-      YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc);
+      YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
     }
 
   /* If the proper action on seeing token YYTOKEN is to reduce or to
@@ -1177,8 +1216,8 @@
   if (yyn == YYFINAL)
     YYACCEPT;
 
-  /* Shift the lookahead token.  */
-  YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken]));
+  /* Shift the look-ahead token.  */
+  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
 
   /* Discard the token being shifted unless it is eof.  */
   if (yychar != YYEOF)
@@ -1229,158 +1268,180 @@
   switch (yyn)
     {
         case 2:
-#line 160 "ast_expr2.y"
+#line 165 "ast_expr2.y"
     { ((struct parse_io *)parseio)->val = (struct val *)calloc(sizeof(struct val),1);
-              ((struct parse_io *)parseio)->val->type = yyval.val->type;
-              if( yyval.val->type == AST_EXPR_integer )
-		((struct parse_io *)parseio)->val->u.i = yyval.val->u.i;
+              ((struct parse_io *)parseio)->val->type = (yyvsp[0].val)->type;
+              if( (yyvsp[0].val)->type == AST_EXPR_integer )
+				  ((struct parse_io *)parseio)->val->u.i = (yyvsp[0].val)->u.i;
               else
-                ((struct parse_io *)parseio)->val->u.s = yyval.val->u.s; ;}
+				  ((struct parse_io *)parseio)->val->u.s = (yyvsp[0].val)->u.s; 
+			  free((yyvsp[0].val));
+			;}
     break;
 
   case 3:
-#line 168 "ast_expr2.y"
-    { yyval.val= yyvsp[0].val;;}
+#line 175 "ast_expr2.y"
+    { (yyval.val)= (yyvsp[0].val);;}
     break;
 
   case 4:
-#line 169 "ast_expr2.y"
-    { yyval.val = yyvsp[-1].val; 

[... 6203 lines stripped ...]


More information about the svn-commits mailing list