summaryrefslogtreecommitdiff
path: root/apps/app_queue.c
diff options
context:
space:
mode:
authorKevin P. Fleming <kpfleming@digium.com>2005-06-09 19:34:12 +0000
committerKevin P. Fleming <kpfleming@digium.com>2005-06-09 19:34:12 +0000
commit706bf6d42766fb541505fe59bed2a04dac1cfa92 (patch)
treed73a890735712fd867d53536728d5607cb075db6 /apps/app_queue.c
parent8c6c774ab685aa523a61785d00d4bd92331432fc (diff)
ensure CLI commands produce proper terminating output when used with manager interface (bug #4497)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5884 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_queue.c')
-rwxr-xr-xapps/app_queue.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c
index c4f2de1f9..49662f3b5 100755
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -3152,9 +3152,13 @@ static char *complete_queue(char *line, char *word, int pos, int state)
static int manager_queues_show( struct mansession *s, struct message *m )
{
char *a[] = { "show", "queues" };
- return queues_show(s->fd, 2, a);
-}
+ ast_mutex_lock(&s->lock);
+ queues_show(s->fd, 2, a);
+ ast_cli(s->fd, "\r\n\r\n"); /* Properly terminate Manager output */
+ ast_mutex_unlock(&s->lock);
+ return RESULT_SUCCESS;
+}
/* Dump queue status */
static int manager_queues_status( struct mansession *s, struct message *m )