[svn-commits] twilson: trunk r275816 - /trunk/channels/chan_sip.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Jul 12 18:27:47 CDT 2010


Author: twilson
Date: Mon Jul 12 18:27:42 2010
New Revision: 275816

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=275816
Log:
Don't try to ref authpeer when it isn't set

Modified:
    trunk/channels/chan_sip.c

Modified: trunk/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_sip.c?view=diff&rev=275816&r1=275815&r2=275816
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Mon Jul 12 18:27:42 2010
@@ -20816,7 +20816,9 @@
 		if (p->relatedpeer) {
 			p->relatedpeer = unref_peer(p->relatedpeer,"unsetting the relatedpeer field in the dialog, before it is set to something else.");
 		}
-		p->relatedpeer = ref_peer(authpeer, "setting dialog's relatedpeer pointer");
+		if (authpeer) {
+			p->relatedpeer = ref_peer(authpeer, "setting dialog's relatedpeer pointer");
+		}
 		/* If T38 is needed but not present, then make it magically appear */
 		if (ast_test_flag(&p->flags[1], SIP_PAGE2_T38SUPPORT) && !p->udptl) {
 			struct sockaddr_in bindaddr_sin_tmp;




More information about the svn-commits mailing list