[svn-commits] rmudgett: branch 1.8 r409156 - /branches/1.8/channels/chan_sip.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Feb 28 11:57:51 CST 2014


Author: rmudgett
Date: Fri Feb 28 11:57:45 2014
New Revision: 409156

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=409156
Log:
chan_sip: Fix crash in ast_channel_hangupcause_set().

* Fix crash in ast_channel_hangupcause_set() because p->owner not checked
before calling.  Regression introduced by the fix for ASTERISK-22621.

(closes issue ASTERISK-23135)
Reported by: OK

(issue ASTERISK-23323)
Reported by: Walter Doekes

Modified:
    branches/1.8/channels/chan_sip.c

Modified: branches/1.8/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/channels/chan_sip.c?view=diff&rev=409156&r1=409155&r2=409156
==============================================================================
--- branches/1.8/channels/chan_sip.c (original)
+++ branches/1.8/channels/chan_sip.c Fri Feb 28 11:57:45 2014
@@ -20949,9 +20949,11 @@
 					/* This 200 OK's SDP is not acceptable, so we need to ack, then hangup */
 					/* For re-invites, we try to recover */
 					ast_set_flag(&p->flags[0], SIP_PENDINGBYE);
-					p->owner->hangupcause = AST_CAUSE_BEARERCAPABILITY_NOTAVAIL;
 					p->hangupcause = AST_CAUSE_BEARERCAPABILITY_NOTAVAIL;
-					sip_queue_hangup_cause(p, AST_CAUSE_BEARERCAPABILITY_NOTAVAIL);
+					if (p->owner) {
+						p->owner->hangupcause = AST_CAUSE_BEARERCAPABILITY_NOTAVAIL;
+						sip_queue_hangup_cause(p, AST_CAUSE_BEARERCAPABILITY_NOTAVAIL);
+					}
 				}
 			}
 			ast_rtp_instance_activate(p->rtp);




More information about the svn-commits mailing list