diff options
author | root <root@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-05-30 15:07:02 +0000 |
---|---|---|
committer | root <root@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-05-30 15:07:02 +0000 |
commit | 70dd654ee8ee6a9a57ffa5db5d97fd972163c8f7 (patch) | |
tree | 443dd46ab903edd07a8f149620761b485e97f12f /apps/app_queue.c | |
parent | 9919fdf1ff8c10ca00143f9ab4dc883bd25da14d (diff) |
automerge commit
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2-netsec@30799 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_queue.c')
-rw-r--r-- | apps/app_queue.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c index 5e41b990d..53929b309 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -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)) { |