summaryrefslogtreecommitdiff
path: root/channels/chan_sip.c
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2014-02-28 18:03:56 +0000
committerRichard Mudgett <rmudgett@digium.com>2014-02-28 18:03:56 +0000
commit954a3cf26f639dae31b96f908372800c6a4ff6aa (patch)
tree5fe8307db5de43f2e972c5daebb95e65f3d73a1e /channels/chan_sip.c
parenta40ea867cd902535465c8981578d942dd8d24b5b (diff)
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 ........ Merged revisions 409156 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 409157 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 409158 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@409159 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r--channels/chan_sip.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index f717c77ee..1b4fa4afe 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -23114,9 +23114,11 @@ static void handle_response_invite(struct sip_pvt *p, int resp, const char *rest
/* 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);
- ast_channel_hangupcause_set(p->owner, AST_CAUSE_BEARERCAPABILITY_NOTAVAIL);
p->hangupcause = AST_CAUSE_BEARERCAPABILITY_NOTAVAIL;
- sip_queue_hangup_cause(p, AST_CAUSE_BEARERCAPABILITY_NOTAVAIL);
+ if (p->owner) {
+ ast_channel_hangupcause_set(p->owner, AST_CAUSE_BEARERCAPABILITY_NOTAVAIL);
+ sip_queue_hangup_cause(p, AST_CAUSE_BEARERCAPABILITY_NOTAVAIL);
+ }
}
}
ast_rtp_instance_activate(p->rtp);