[asterisk-commits] russell: branch russell/iax2_find_callno r114838 - /team/russell/iax2_find_ca...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Apr 29 13:29:53 CDT 2008


Author: russell
Date: Tue Apr 29 13:29:53 2008
New Revision: 114838

URL: http://svn.digium.com/view/asterisk?view=rev&rev=114838
Log:
add some more sanity checking

Modified:
    team/russell/iax2_find_callno/channels/chan_iax2.c

Modified: team/russell/iax2_find_callno/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/team/russell/iax2_find_callno/channels/chan_iax2.c?view=diff&rev=114838&r1=114837&r2=114838
==============================================================================
--- team/russell/iax2_find_callno/channels/chan_iax2.c (original)
+++ team/russell/iax2_find_callno/channels/chan_iax2.c Tue Apr 29 13:29:53 2008
@@ -2246,7 +2246,9 @@
 			ast_queue_hangup(owner, -1);
 		}
 
-		remove_by_peercallno(pvt);
+		if (pvt->peercallno) {
+			remove_by_peercallno(pvt);
+		}
 
 		ao2_ref(pvt, -1);
 		pvt = NULL;
@@ -6461,7 +6463,9 @@
 	pvt->iseqno = 0;
 	pvt->aseqno = 0;
 
-	remove_by_peercallno(pvt);
+	if (pvt->peercallno) {
+		remove_by_peercallno(pvt);
+	}
 	pvt->peercallno = peercallno;
 	store_by_peercallno(pvt);
 
@@ -7982,9 +7986,13 @@
 	if (!inaddrcmp(&sin, &iaxs[fr->callno]->addr) && !minivid &&
 		f.subclass != IAX_COMMAND_TXCNT &&		/* for attended transfer */
 		f.subclass != IAX_COMMAND_TXACC) {		/* for attended transfer */
-		remove_by_peercallno(iaxs[fr->callno]);
+		if (iaxs[fr->callno]->peercallno) {
+			remove_by_peercallno(iaxs[fr->callno]);
+		}
 		iaxs[fr->callno]->peercallno = (unsigned short) (ntohs(mh->callno) & ~IAX_FLAG_FULL);
-		store_by_peercallno(iaxs[fr->callno]);
+		if (iaxs[fr->callno]->peercallno) {
+			store_by_peercallno(iaxs[fr->callno]);
+		}
 	}
 	if (ntohs(mh->callno) & IAX_FLAG_FULL) {
 		if (iaxdebug)




More information about the asterisk-commits mailing list