From: Russell Bryant Date: Fri, 14 Jan 2005 04:59:54 +0000 (+0000) Subject: Don't allow masquerading into oneself (bug #3040) X-Git-Tag: 1.0.11.1~269 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2ef418765c1425b2527ff888233a0ebb295c610b;p=thirdparty%2Fasterisk.git Don't allow masquerading into oneself (bug #3040) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-0@4788 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index a9692ade27..61297b49b6 100755 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -5135,9 +5135,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 */