[Asterisk-cvs] asterisk/channels chan_sip.c,1.621,1.622

markster at lists.digium.com markster at lists.digium.com
Sun Jan 9 03:38:30 CST 2005


Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv11469/channels

Modified Files:
	chan_sip.c 
Log Message:
Don't allow masquerading into oneself (bug #3040)


Index: chan_sip.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v
retrieving revision 1.621
retrieving revision 1.622
diff -u -d -r1.621 -r1.622
--- chan_sip.c	9 Jan 2005 01:58:45 -0000	1.621
+++ chan_sip.c	9 Jan 2005 09:42:54 -0000	1.622
@@ -5335,9 +5335,13 @@
 			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 */




More information about the svn-commits mailing list