diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-06-09 19:34:12 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-06-09 19:34:12 +0000 |
commit | dd630cc4504c31d0db63696bd1c0269343937fbb (patch) | |
tree | d73a890735712fd867d53536728d5607cb075db6 /apps | |
parent | 5fbc774f67ee605583fe32b865712d10f03e7639 (diff) |
ensure CLI commands produce proper terminating output when used with manager interface (bug #4497)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5884 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rwxr-xr-x | apps/app_queue.c | 8 |
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 ) |