aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2003-08-16 16:06:29 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2003-08-16 16:06:29 +0000
commitd4ab02309a013663007411b221f6fb84939a7175 (patch)
tree57753dc6f3e8b79abecabbee76b1c23d4656884f /apps
parent925e33e4576f5963cf8e2097e1f56891f980e52e (diff)
Trim post dash portion of name if unspecified
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1352 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rwxr-xr-xapps/app_queue.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c
index 1b5088c95..9206e1dde 100755
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -1013,6 +1013,7 @@ static int aqm_exec(struct ast_channel *chan, void *data)
struct localuser *u;
char *queuename;
char info[512];
+ char tmpchan[512]="";
char *interface=NULL;
struct ast_call_queue *q;
struct member *save;
@@ -1034,8 +1035,13 @@ static int aqm_exec(struct ast_channel *chan, void *data)
*interface = '\0';
interface++;
}
- else
- interface = chan->name ;
+ else {
+ strncpy(tmpchan, chan->name, sizeof(tmpchan) - 1);
+ interface = strrchr(tmpchan, '-');
+ if (interface)
+ *interface = '\0';
+ interface = tmpchan;
+ }
}
if( ( q = queues) != NULL )