Fixing the build.
authorMark Michelson <mmichelson@digium.com>
Tue, 16 Oct 2007 21:51:26 +0000 (21:51 +0000)
committerMark Michelson <mmichelson@digium.com>
Tue, 16 Oct 2007 21:51:26 +0000 (21:51 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@85992 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_queue.c

index 3f14761..4c28142 100644 (file)
@@ -3214,10 +3214,9 @@ static int remove_from_queue(const char *queuename, const char *interface)
                if ((mem = ao2_find(q->members, &tmpmem, OBJ_POINTER))) {
                        /* XXX future changes should beware of this assumption!! */
                        if(!mem->dynamic) {
-                               res = RES_NOT_DYNAMIC;
                                ao2_ref(mem, -1);
-                               ast_mutex_unlock(&q->lock);
-                               break;
+                               ao2_unlock(q);
+                               return RES_NOT_DYNAMIC;
                        }
                        q->membercount--;
                        manager_event(EVENT_FLAG_AGENT, "QueueMemberRemoved",
@@ -4844,8 +4843,8 @@ static char *handle_queue_add_member(struct ast_cli_entry *e, int cmd, struct as
                ast_cli(a->fd, "Out of memory\n");
                return CLI_FAILURE;
        case RES_NOT_DYNAMIC:
-               ast_cli(fd, "Member not dynamic\n");
-               return RESULT_FAILURE;
+               ast_cli(a->fd, "Member not dynamic\n");
+               return CLI_FAILURE;
        default:
                return CLI_FAILURE;
        }