Merged revisions 84692 via svnmerge from
authorMark Michelson <mmichelson@digium.com>
Thu, 4 Oct 2007 22:00:10 +0000 (22:00 +0000)
committerMark Michelson <mmichelson@digium.com>
Thu, 4 Oct 2007 22:00:10 +0000 (22:00 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r84692 | mmichelson | 2007-10-04 16:57:03 -0500 (Thu, 04 Oct 2007) | 5 lines

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)

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@84693 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_queue.c

index b2078c6..26f503b 100644 (file)
@@ -815,7 +815,8 @@ static void init_queue(struct call_queue *q)
        q->monfmt[0] = '\0';
        q->periodicannouncefrequency = 0;
        q->sound_callerannounce[0] = '\0';      /* Default, don't announce the caller that he has been answered */
-       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));