[asterisk-commits] bbryant: branch bbryant/iax2_rotation r115572 - in /team/bbryant/iax2_rotatio...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu May 8 14:28:46 CDT 2008


Author: bbryant
Date: Thu May  8 14:28:45 2008
New Revision: 115572

URL: http://svn.digium.com/view/asterisk?view=rev&rev=115572
Log:
Commit merge of my branch.

Removed:
    team/bbryant/iax2_rotation/contrib/scripts/postgres_cdr.sql
Modified:
    team/bbryant/iax2_rotation/   (props changed)
    team/bbryant/iax2_rotation/channels/chan_iax2.c
    team/bbryant/iax2_rotation/channels/chan_sip.c
    team/bbryant/iax2_rotation/channels/chan_zap.c
    team/bbryant/iax2_rotation/contrib/init.d/rc.debian.asterisk
    team/bbryant/iax2_rotation/main/pbx.c

Propchange: team/bbryant/iax2_rotation/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Propchange: team/bbryant/iax2_rotation/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu May  8 14:28:45 2008
@@ -1,1 +1,1 @@
-/trunk:1-115538
+/trunk:1-115571

Modified: team/bbryant/iax2_rotation/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/team/bbryant/iax2_rotation/channels/chan_iax2.c?view=diff&rev=115572&r1=115571&r2=115572
==============================================================================
--- team/bbryant/iax2_rotation/channels/chan_iax2.c (original)
+++ team/bbryant/iax2_rotation/channels/chan_iax2.c Thu May  8 14:28:45 2008
@@ -3952,6 +3952,21 @@
 
 	ast_mutex_lock(&iaxsl[callno]);
 	pvt = iaxs[callno];
+
+	if (!pvt->peercallno) {
+		/* We don't know the remote side's call number, yet.  :( */
+		int count = 10;
+		while (count-- && pvt && !pvt->peercallno) {
+			ast_mutex_unlock(&iaxsl[callno]);
+			usleep(1);
+			ast_mutex_lock(&iaxsl[callno]);
+			pvt = iaxs[callno];
+		}
+		if (!pvt->peercallno) {
+			res = -1;
+			goto done;
+		}
+	}
 
 	switch (condition) {
 	case AST_CONTROL_HOLD:

Modified: team/bbryant/iax2_rotation/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/bbryant/iax2_rotation/channels/chan_sip.c?view=diff&rev=115572&r1=115571&r2=115572
==============================================================================
--- team/bbryant/iax2_rotation/channels/chan_sip.c (original)
+++ team/bbryant/iax2_rotation/channels/chan_sip.c Thu May  8 14:28:45 2008
@@ -15970,8 +15970,6 @@
 		}
 		break;
 	case 408:	/* Request timeout */
-		if (global_regattempts_max)
-			p->registry->regattempts = global_regattempts_max+1;
 		p->needdestroy = 1;
 		if (r->call)
 			r->call = dialog_unref(r->call, "unsetting registry->call pointer-- case 408");

Modified: team/bbryant/iax2_rotation/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/team/bbryant/iax2_rotation/channels/chan_zap.c?view=diff&rev=115572&r1=115571&r2=115572
==============================================================================
--- team/bbryant/iax2_rotation/channels/chan_zap.c (original)
+++ team/bbryant/iax2_rotation/channels/chan_zap.c Thu May  8 14:28:45 2008
@@ -9369,20 +9369,16 @@
 				res = ss7_read(ss7, pollers[i].fd);
 				ast_mutex_unlock(&linkset->lock);
 			}
+
 			if (pollers[i].revents & POLLOUT) {
 				ast_mutex_lock(&linkset->lock);
 				res = ss7_write(ss7, pollers[i].fd);
 				ast_mutex_unlock(&linkset->lock);
 				if (res < 0) {
-					ast_log(LOG_ERROR, "Error in write %s", strerror(errno));
-				}
-			}
-		}
-
-#if 0
-		if (res < 0)
-			exit(-1);
-#endif
+					ast_debug(1, "Error in write %s\n", strerror(errno));
+				}
+			}
+		}
 
 		while ((e = ss7_check_event(ss7))) {
 			switch (e->e) {

Modified: team/bbryant/iax2_rotation/contrib/init.d/rc.debian.asterisk
URL: http://svn.digium.com/view/asterisk/team/bbryant/iax2_rotation/contrib/init.d/rc.debian.asterisk?view=diff&rev=115572&r1=115571&r2=115572
==============================================================================
--- team/bbryant/iax2_rotation/contrib/init.d/rc.debian.asterisk (original)
+++ team/bbryant/iax2_rotation/contrib/init.d/rc.debian.asterisk Thu May  8 14:28:45 2008
@@ -22,6 +22,7 @@
 DESC="Asterisk PBX"
 # Full path to asterisk binary
 DAEMON=/usr/sbin/asterisk
+TRUE=/bin/true
 
 # Uncomment this ONLY if you know what you are doing.
 # export LD_ASSUME_KERNEL=2.4.1
@@ -53,7 +54,7 @@
   start)
 	# Check if Asterisk is already running.  If it is, then bug out, because
 	# starting up Asterisk when Asterisk is already running is very bad.
-	VERSION=`${ASTSBINDIR}/asterisk -rx 'core show version'`
+	VERSION=`${DAEMON} -rx 'core show version' || ${TRUE}`
 	if [ "${VERSION:0:8}" = "Asterisk" ]; then # otherwise "Unable t"
 		echo "Asterisk is already running.  $0 will exit now."
 		exit 1

Modified: team/bbryant/iax2_rotation/main/pbx.c
URL: http://svn.digium.com/view/asterisk/team/bbryant/iax2_rotation/main/pbx.c?view=diff&rev=115572&r1=115571&r2=115572
==============================================================================
--- team/bbryant/iax2_rotation/main/pbx.c (original)
+++ team/bbryant/iax2_rotation/main/pbx.c Thu May  8 14:28:45 2008
@@ -6310,13 +6310,13 @@
 		   the PBX, we have to make a new channel, masquerade, and start the PBX
 		   at the new location */
 		struct ast_channel *tmpchan = ast_channel_alloc(0, chan->_state, 0, 0, chan->accountcode, chan->exten, chan->context, chan->amaflags, "AsyncGoto/%s", chan->name);
-		if (chan->cdr) {
-			ast_cdr_discard(tmpchan->cdr);
-			tmpchan->cdr = ast_cdr_dup(chan->cdr);  /* share the love */
-		}
-		if (!tmpchan)
+		if (!tmpchan) {
 			res = -1;
-		else {
+		} else {
+			if (chan->cdr) {
+				ast_cdr_discard(tmpchan->cdr);
+				tmpchan->cdr = ast_cdr_dup(chan->cdr);  /* share the love */
+			}
 			/* Make formats okay */
 			tmpchan->readformat = chan->readformat;
 			tmpchan->writeformat = chan->writeformat;




More information about the asterisk-commits mailing list