Insure that we are not going to pass a NULL pointer to add_to_interfaces.
authorMark Michelson <mmichelson@digium.com>
Fri, 25 Jan 2008 14:53:09 +0000 (14:53 +0000)
committerMark Michelson <mmichelson@digium.com>
Fri, 25 Jan 2008 14:53:09 +0000 (14:53 +0000)
(closes issue #11840)
Reported by: junky

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

apps/app_queue.c

index a6b2d3f..547132b 100644 (file)
@@ -1306,7 +1306,7 @@ static void rt_handle_member_record(struct call_queue *q, char *interface, const
                if ((m = create_queue_member(interface, membername, penalty, paused, state_interface))) {
                        m->dead = 0;
                        m->realtime = 1;
-                       add_to_interfaces(state_interface);
+                       add_to_interfaces(m->state_interface);
                        ao2_link(q->members, m);
                        ao2_ref(m, -1);
                        m = NULL;
@@ -3708,7 +3708,7 @@ static int add_to_queue(const char *queuename, const char *interface, const char
        ao2_lock(q);
        if ((old_member = interface_exists(q, interface)) == NULL) {
                if ((new_member = create_queue_member(interface, membername, penalty, paused, state_interface))) {
-                       add_to_interfaces(state_interface);
+                       add_to_interfaces(new_member->state_interface);
                        new_member->dynamic = 1;
                        ao2_link(q->members, new_member);
                        q->membercount++;