[Asterisk-cvs] asterisk/channels chan_sip.c,1.510.2.38,1.510.2.39

russell at lists.digium.com russell at lists.digium.com
Thu Jan 13 22:56:02 CST 2005


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

Modified Files:
      Tag: v1-0
	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.510.2.38
retrieving revision 1.510.2.39
diff -u -d -r1.510.2.38 -r1.510.2.39
--- chan_sip.c	13 Jan 2005 04:34:01 -0000	1.510.2.38
+++ chan_sip.c	14 Jan 2005 04:59:54 -0000	1.510.2.39
@@ -5135,9 +5135,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