diff options
author | mnicholson <mnicholson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-09-30 19:51:27 +0000 |
---|---|---|
committer | mnicholson <mnicholson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-09-30 19:51:27 +0000 |
commit | ac2dfd811cf1bd13993ec48138ba856d47d8f342 (patch) | |
tree | bca674abf7c2074e5dd3695a18729e634f92ee07 | |
parent | 0cc143c2fff683ada16a15e19dc055852d7da27a (diff) |
Properly handle channel allocation failures duing invites with replaces.
ABE-2588
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@289553 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | channels/chan_sip.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 5f523f0a8..eedac8f04 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -20252,7 +20252,8 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int /* Initialize our tag */ make_our_tag(p->tag, sizeof(p->tag)); - /* First invitation - create the channel */ + /* First invitation - create the channel. Allocation + * failures are handled below. */ c = sip_new(p, AST_STATE_DOWN, S_OR(p->peername, NULL)); *recount = 1; @@ -20412,7 +20413,7 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int if (!req->ignore && p) p->lastinvite = seqno; - if (replace_id) { /* Attended transfer or call pickup - we're the target */ + if (c && replace_id) { /* Attended transfer or call pickup - we're the target */ if (!ast_strlen_zero(pickup.exten)) { append_history(p, "Xfer", "INVITE/Replace received"); |