diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-01-02 20:24:09 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-01-02 20:24:09 +0000 |
commit | 9e917c6059f695c815553d2dbdbb3e1781b32abd (patch) | |
tree | ff42e7f3c951f283d8d3aebe3b7af6d51f4b888a /channels | |
parent | 31a61eb8e455612bcb8cba80dc23aadb6b89477f (diff) |
Allocate a SIP refer structure when performing a transfer using BYE with Also so that the transfer information is properly stored. (AST-2008-001)
(closes issue #11637)
Reported by: greyvoip
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@95946 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_sip.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 2835aebe6..cd09992d2 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -9048,9 +9048,14 @@ static int get_also_info(struct sip_pvt *p, struct sip_request *oreq) { char tmp[256] = "", *c, *a; struct sip_request *req = oreq ? oreq : &p->initreq; - struct sip_refer *referdata = p->refer; + struct sip_refer *referdata = NULL; const char *transfer_context = NULL; + if (!p->refer && !sip_refer_allocate(p)) + return -1; + + referdata = p->refer; + ast_copy_string(tmp, get_header(req, "Also"), sizeof(tmp)); c = get_in_brackets(tmp); |