diff options
author | bweschke <bweschke@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-07-21 19:10:58 +0000 |
---|---|---|
committer | bweschke <bweschke@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-07-21 19:10:58 +0000 |
commit | e4561310c6f06332382a8c6fe079208589904aea (patch) | |
tree | 332a43411b48e29746aa286bf274255c8472cf08 /channels/chan_sip.c | |
parent | f395a52a02593f8556bd3786addc671d3f4250e0 (diff) |
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.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@38051 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r-- | channels/chan_sip.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 1c1022157..751fd4130 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -11239,11 +11239,10 @@ static void handle_response_invite(struct sip_pvt *p, int resp, char *rest, stru 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; |