diff options
author | Mark Spencer <markster@digium.com> | 2005-01-09 09:42:54 +0000 |
---|---|---|
committer | Mark Spencer <markster@digium.com> | 2005-01-09 09:42:54 +0000 |
commit | 88979c2a4a705dd1254504c0e049a8f6617e17bf (patch) | |
tree | b4105f856737cd2e5a4aa7c92eb99bcb34fe7d08 /channels | |
parent | 7af0234fa7b0aff6e7130ad0a13f85fae8fe0a77 (diff) |
Don't allow masquerading into oneself (bug #3040)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4726 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rwxr-xr-x | channels/chan_sip.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 173a62ce5..ec9ccda9c 100755 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -5335,9 +5335,13 @@ static int get_refer_info(struct sip_pvt *p, struct sip_request *oreq) p2 = p2->next; } ast_mutex_unlock(&iflock); - if (p->refer_call) - return 0; - else + if (p->refer_call) { + if (p->refer_call == p) { + ast_log(LOG_NOTICE, "Supervised transfer attempted to transfer into same call id (%s == %s)!\n", tmp5, p->callid); + p->refer_call = NULL; + } else + return 0; + } else ast_log(LOG_NOTICE, "Supervised transfer requested, but unable to find callid '%s'\n", tmp5); } else if (ast_exists_extension(NULL, p->context, c, 1, NULL) || !strcmp(c, ast_parking_ext())) { /* This is an unsupervised transfer */ |