[asterisk-commits] russell: branch russell/iax_refcount r79439 - in /team/russell/iax_refcount: ...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Aug 14 12:34:48 CDT 2007


Author: russell
Date: Tue Aug 14 12:34:48 2007
New Revision: 79439

URL: http://svn.digium.com/view/asterisk?view=rev&rev=79439
Log:
sync with 1.4 branch

Modified:
    team/russell/iax_refcount/   (props changed)
    team/russell/iax_refcount/channels/chan_iax2.c

Propchange: team/russell/iax_refcount/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Tue Aug 14 12:34:48 2007
@@ -1,1 +1,1 @@
-/branches/1.4:1-79433
+/branches/1.4:1-79438

Modified: team/russell/iax_refcount/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/team/russell/iax_refcount/channels/chan_iax2.c?view=diff&rev=79439&r1=79438&r2=79439
==============================================================================
--- team/russell/iax_refcount/channels/chan_iax2.c (original)
+++ team/russell/iax_refcount/channels/chan_iax2.c Tue Aug 14 12:34:48 2007
@@ -5701,8 +5701,11 @@
 		return -1;
 	}
 	ast_mutex_lock(&iaxsl[callno]);
-	if (!iaxs[callno])
+	if (!iaxs[callno]) {
+		if (ast_test_flag(p, IAX_TEMPONLY))
+			destroy_peer(p);
 		return -1;
+	}
 
 	if (ast_test_flag((&globalflags), IAX_RTUPDATE) && (ast_test_flag(p, IAX_TEMPONLY|IAX_RTCACHEFRIENDS))) {
 		if (sin->sin_addr.s_addr) {
@@ -5742,8 +5745,11 @@
 	}		
 
 	/* Make sure our call still exists, an INVAL at the right point may make it go away */
-	if (!iaxs[callno])
+	if (!iaxs[callno]) {
+		if (ast_test_flag(p, IAX_TEMPONLY))
+			destroy_peer(p);
 		return 0;
+	}
 
 	/* Store socket fd */
 	p->sockfd = fd;
@@ -5807,8 +5813,11 @@
 	ast_mutex_unlock(&iaxsl[callno]);
 	p = find_peer(peer_name, 1);
 	ast_mutex_lock(&iaxsl[callno]);
-	if (!iaxs[callno])
+	if (!iaxs[callno]) {
+		if (p && ast_test_flag(p, IAX_TEMPONLY))
+			destroy_peer(p);
 		return -1;
+	}
 	if (p) {
 		memset(&ied, 0, sizeof(ied));
 		iax_ie_append_short(&ied, IAX_IE_AUTHMETHODS, p->authmethods);
@@ -10020,6 +10029,9 @@
 		}
 	}
 
+	if (ast_test_flag(peer, IAX_TEMPONLY))
+		destroy_peer(peer);
+
 	return 0;
 }
 




More information about the asterisk-commits mailing list