diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-01-20 18:34:42 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-01-20 18:34:42 +0000 |
commit | 14d1673daeda785d27ba1c3875a4d080a7d11a7c (patch) | |
tree | 560e5d805775e36a499a720a7bffbe94926a21b9 | |
parent | 75c0ac587fd8bda904f74e49d637ca1de0774486 (diff) |
fix invalid value of prev_q (issue #6302)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@8347 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | apps/app_queue.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c index f34e6a0b2..37611e671 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -763,20 +763,17 @@ static void rt_handle_member_record(struct ast_call_queue *q, char *interface, c static struct ast_call_queue *reload_queue_rt(const char *queuename, struct ast_variable *queue_vars, struct ast_config *member_config) { struct ast_variable *v; - struct ast_call_queue *q, *prev_q; + struct ast_call_queue *q, *prev_q = NULL; struct member *m, *prev_m, *next_m; char *interface; char *tmp, *tmp_name; char tmpbuf[64]; /* Must be longer than the longest queue param name. */ /* Find the queue in the in-core list (we will create a new one if not found). */ - q = queues; - prev_q = NULL; - while (q) { + for (q = queues; q; q = q->next) { if (!strcasecmp(q->name, queuename)) { break; } - q = q->next; prev_q = q; } |