[Asterisk-cvs] asterisk/apps app_queue.c,1.142,1.143

kpfleming at lists.digium.com kpfleming at lists.digium.com
Thu Jun 9 15:32:05 CDT 2005


Update of /usr/cvsroot/asterisk/apps
In directory mongoose.digium.com:/tmp/cvs-serv31107/apps

Modified Files:
	app_queue.c 
Log Message:
ensure CLI commands produce proper terminating output when used with manager interface (bug #4497)


Index: app_queue.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_queue.c,v
retrieving revision 1.142
retrieving revision 1.143
diff -u -d -r1.142 -r1.143
--- app_queue.c	6 Jun 2005 22:39:31 -0000	1.142
+++ app_queue.c	9 Jun 2005 19:34:12 -0000	1.143
@@ -3152,9 +3152,13 @@
 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 )




More information about the svn-commits mailing list