[Asterisk-cvs] asterisk/apps app_transfer.c,1.9,1.10

markster at lists.digium.com markster at lists.digium.com
Sun May 8 12:29:31 CDT 2005


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

Modified Files:
	app_transfer.c 
Log Message:
Allow transfer to work without a tech (bug #4199)


Index: app_transfer.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_transfer.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- app_transfer.c	21 Apr 2005 06:02:43 -0000	1.9
+++ app_transfer.c	8 May 2005 16:35:54 -0000	1.10
@@ -49,18 +49,21 @@
 	int len;
 	struct localuser *u;
 	char *slash;
+	char *dest = data;
 	if (!data || !strlen(data)) {
 		ast_log(LOG_WARNING, "Transfer requires an argument ([Tech/]destination)\n");
 		res = 1;
 	}
 	if ((slash = strchr((char *)data, '/')) && (len = (slash - (char *)data))) {
+		dest = slash + 1;
 		/* Allow execution only if the Tech/destination agrees with the type of the channel */
 		if (strncasecmp(chan->type, (char *)data, len))
 			return 0;
 	}
 	LOCAL_USER_ADD(u);
 	if (!res) {
-		res = ast_transfer(chan, data + strlen(chan->type) + 1);
+		res = ast_transfer(chan, dest);
+
 	}
 	if (!res) {
 		/* Look for a "busy" place */




More information about the svn-commits mailing list