[asterisk-commits] russell: trunk r183560 - in /trunk: ./ channels/chan_iax2.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Mar 20 12:01:02 CDT 2009


Author: russell
Date: Fri Mar 20 12:00:58 2009
New Revision: 183560

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=183560
Log:
Merged revisions 183559 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r183559 | russell | 2009-03-20 11:53:25 -0500 (Fri, 20 Mar 2009) | 2 lines

Fix a crash in IAX2 registration handling found during load testing with dvossel.

........

Modified:
    trunk/   (props changed)
    trunk/channels/chan_iax2.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/channels/chan_iax2.c
URL: http://svn.digium.com/svn-view/asterisk/trunk/channels/chan_iax2.c?view=diff&rev=183560&r1=183559&r2=183560
==============================================================================
--- trunk/channels/chan_iax2.c (original)
+++ trunk/channels/chan_iax2.c Fri Mar 20 12:00:58 2009
@@ -6682,15 +6682,20 @@
 	ast_devstate_changed(AST_DEVICE_UNKNOWN, "IAX2/%s", p->name); /* Activate notification */
 
 return_unref:
-	ast_string_field_set(iaxs[callno], peer, peer);
-	/* Choose lowest expiry number */
-	if (expire && (expire < iaxs[callno]->expiry)) 
-		iaxs[callno]->expiry = expire;
+	if (iaxs[callno]) {
+		ast_string_field_set(iaxs[callno], peer, peer);
+
+		/* Choose lowest expiry number */
+		if (expire && (expire < iaxs[callno]->expiry)) {
+			iaxs[callno]->expiry = expire;
+		}
+	}
 
 	res = 0;
 
-	if (p)
+	if (p) {
 		peer_unref(p);
+	}
 
 	return res;
 }




More information about the asterisk-commits mailing list