aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_transfer.c
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2005-05-08 16:35:54 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2005-05-08 16:35:54 +0000
commit5ca62a6c1367dbb9fc7da9acf5cf509684ee98bc (patch)
tree826158de38b8955e3aa04e47cf285e4374d8a339 /apps/app_transfer.c
parent4d8fb679c95a3f7779467c53c4b8a2cfd70f9366 (diff)
Allow transfer to work without a tech (bug #4199)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5599 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_transfer.c')
-rwxr-xr-xapps/app_transfer.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/app_transfer.c b/apps/app_transfer.c
index f3628959c..517a2c4b9 100755
--- a/apps/app_transfer.c
+++ b/apps/app_transfer.c
@@ -49,18 +49,21 @@ static int transfer_exec(struct ast_channel *chan, void *data)
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 */