[asterisk-commits] mmichelson: branch 1.4 r131369 - /branches/1.4/apps/app_queue.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jul 16 15:23:02 CDT 2008


Author: mmichelson
Date: Wed Jul 16 15:23:02 2008
New Revision: 131369

URL: http://svn.digium.com/view/asterisk?view=rev&rev=131369
Log:
Move the init_queue call back to where it used to be (changed
Sept 12 last year). It was moved then to prevent a memory leak.
Since then, the same memory leak recurred and was fixed in a 
better way.

Now it has been found that the placement of this init_queue
call can cause problems if a realtime queue has values changed
to an empty string. The problem is that the default value
for that queue parameter would not be set.

(closes issue #13084)
Reported by: elbriga


Modified:
    branches/1.4/apps/app_queue.c

Modified: branches/1.4/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/apps/app_queue.c?view=diff&rev=131369&r1=131368&r2=131369
==============================================================================
--- branches/1.4/apps/app_queue.c (original)
+++ branches/1.4/apps/app_queue.c Wed Jul 16 15:23:02 2008
@@ -1229,9 +1229,9 @@
 		ast_mutex_lock(&q->lock);
 		clear_queue(q);
 		q->realtime = 1;
-		init_queue(q);		/* Ensure defaults for all parameters not set explicitly. */
 		AST_LIST_INSERT_HEAD(&queues, q, list);
 	}
+	init_queue(q);		/* Ensure defaults for all parameters not set explicitly. */
 
 	memset(tmpbuf, 0, sizeof(tmpbuf));
 	for (v = queue_vars; v; v = v->next) {




More information about the asterisk-commits mailing list