diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-08-18 14:03:54 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-08-18 14:03:54 +0000 |
commit | c50f0a414dbb4ac7c864516a17d0ae6fd0346ba0 (patch) | |
tree | 83e7133747023c04ffd726cebda7ef4058b66f4d | |
parent | 93061b1a7de09ab55b200537fbcad4324766df76 (diff) |
Add same magic to remove from queue
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1363 f38db490-d61c-443f-a65b-d21fe96a405b
-rwxr-xr-x | apps/app_queue.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c index 9206e1dde..41e787be5 100755 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -929,6 +929,7 @@ static int rqm_exec(struct ast_channel *chan, void *data) struct member * node ; struct member * look ; char info[512]; + char tmpchan[256]=""; char *interface=NULL; struct ast_call_queue *q; int found=0 ; @@ -949,8 +950,13 @@ static int rqm_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 ) |