diff options
author | rizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-10-23 14:35:37 +0000 |
---|---|---|
committer | rizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-10-23 14:35:37 +0000 |
commit | 169ef7b12c3bb935dde966f86480d26ad016b231 (patch) | |
tree | 7c11ce8cee9daf9465c9658c471b3a21e9f545d8 | |
parent | d3a1bc3716a9d437eab419d76650d6e6e7baa5ff (diff) |
in function get_also_info(), move argument stripping
before splitting around the @, otherwise the refer_to_domain
might contain arguments as well, causing failures.
I think this is a true bug that ought to be fixed in 1.4 as well.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45966 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | channels/chan_sip.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 38523b22d..acb492c6f 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -8758,14 +8758,14 @@ static int get_also_info(struct sip_pvt *p, struct sip_request *oreq) return -1; } c += 4; + if ((a = strchr(c, ';'))) /* Remove arguments */ + *a = '\0'; + if ((a = strchr(c, '@'))) { /* Separate Domain */ *a++ = '\0'; ast_copy_string(referdata->refer_to_domain, a, sizeof(referdata->refer_to_domain)); } - if ((a = strchr(c, ';'))) /* Remove arguments */ - *a = '\0'; - if (sip_debug_test_pvt(p)) ast_verbose("Looking for %s in %s\n", c, p->context); |