[asterisk-commits] bweschke: trunk r38051 - /trunk/channels/chan_sip.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Jul 21 12:10:58 MST 2006


Author: bweschke
Date: Fri Jul 21 14:10:58 2006
New Revision: 38051

URL: http://svn.digium.com/view/asterisk?rev=38051&view=rev
Log:
 This corrects the crash condition present in #7575, but I'm not really sure if it's the "right" fix. Please review and make any adjustments you see necessary.  


Modified:
    trunk/channels/chan_sip.c

Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?rev=38051&r1=38050&r2=38051&view=diff
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Fri Jul 21 14:10:58 2006
@@ -11239,11 +11239,10 @@
 			build_route(p, req, 1);
 		}
 		
-		if (p->owner && (p->owner->_state == AST_STATE_UP)) { /* if this is a re-invite */
-			struct ast_channel *bridgepeer = NULL;
+		struct ast_channel *bridgepeer = NULL;
+		if (p->owner && (p->owner->_state == AST_STATE_UP) && (bridgepeer = ast_bridged_channel(p->owner))) { /* if this is a re-invite */
 			struct sip_pvt *bridgepvt = NULL;
 
-			bridgepeer = ast_bridged_channel(p->owner);
 			if (!bridgepeer->tech) {
 				ast_log(LOG_WARNING, "Ooooh.. no tech!  That's REALLY bad\n");
 				break;



More information about the asterisk-commits mailing list