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

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Oct 4 16:57:03 CDT 2007


Author: mmichelson
Date: Thu Oct  4 16:57:03 2007
New Revision: 84692

URL: http://svn.digium.com/view/asterisk?view=rev&rev=84692
Log:
Don't allocate space for queue members unless it's needed. You end up deleting dynamic members on a reload. Not good.

closes issue (#10879, reported by dazza76, patched by me)


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=84692&r1=84691&r2=84692
==============================================================================
--- branches/1.4/apps/app_queue.c (original)
+++ branches/1.4/apps/app_queue.c Thu Oct  4 16:57:03 2007
@@ -722,7 +722,8 @@
 	q->context[0] = '\0';
 	q->monfmt[0] = '\0';
 	q->periodicannouncefrequency = 0;
-	q->members = ao2_container_alloc(37, member_hash_fn, member_cmp_fn);
+	if(!q->members)
+		q->members = ao2_container_alloc(37, member_hash_fn, member_cmp_fn);
 	q->membercount = 0;
 	q->found = 1;
 	ast_copy_string(q->sound_next, "queue-youarenext", sizeof(q->sound_next));




More information about the asterisk-commits mailing list