]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
automerge commit
authorAutomerge script <automerge@asterisk.org>
Tue, 30 May 2006 15:07:02 +0000 (15:07 +0000)
committerAutomerge script <automerge@asterisk.org>
Tue, 30 May 2006 15:07:02 +0000 (15:07 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@30799 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_queue.c

index 5e41b990ded87a1066a078d5f5da43eca09b0f1e..53929b309dd43737da1f98312697f263e4b7961e 100644 (file)
@@ -622,6 +622,9 @@ static int add_to_interfaces(char *interface)
 {
        struct ast_member_interfaces *curint, *newint;
 
+       if (!interface)
+               return 0;
+
        AST_LIST_LOCK(&interfaces);
        AST_LIST_TRAVERSE(&interfaces, curint, list) {
                if (!strcasecmp(curint->interface, interface))
@@ -649,6 +652,9 @@ static int interface_exists_global(char *interface)
        struct member *mem;
        int ret = 0;
 
+       if (!interface)
+               return ret;
+
        ast_mutex_lock(&qlock);
        for (q = queues; q && !ret; q = q->next) {
                ast_mutex_lock(&q->lock);
@@ -658,6 +664,7 @@ static int interface_exists_global(char *interface)
                                ret = 1;
                                break;
                        }
+                       mem = mem->next;
                }
                ast_mutex_unlock(&q->lock);
        }
@@ -671,6 +678,9 @@ static int remove_from_interfaces(char *interface)
 {
        struct ast_member_interfaces *curint;
 
+       if (!interface)
+               return 0;
+
        AST_LIST_LOCK(&interfaces);
        AST_LIST_TRAVERSE_SAFE_BEGIN(&interfaces, curint, list) {
                if (!strcasecmp(curint->interface, interface) && !interface_exists_global(interface)) {