summaryrefslogtreecommitdiff
path: root/apps/app_queue.c
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2006-01-20 18:40:24 +0000
committerRussell Bryant <russell@russellbryant.com>2006-01-20 18:40:24 +0000
commitcb8bd57a216e4fd9c2212745f49390c06b783c42 (patch)
treefec11cd7798e496f7a1961eeb720210d8f27310a /apps/app_queue.c
parentbe910dd5b624d1d1e396f165daf25b9f3a80fc2e (diff)
Merged revisions 8347 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r8347 | russell | 2006-01-20 13:34:42 -0500 (Fri, 20 Jan 2006) | 2 lines fix invalid value of prev_q (issue #6302) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8348 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_queue.c')
-rw-r--r--apps/app_queue.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c
index 3da915be4..d48d163e4 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -796,20 +796,17 @@ static void rt_handle_member_record(struct ast_call_queue *q, char *interface, c
static struct ast_call_queue *find_queue_by_name_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;
}