[asterisk-commits] branch 1.2 - r8347 /branches/1.2/apps/app_queue.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Jan 20 11:34:43 MST 2006


Author: russell
Date: Fri Jan 20 12:34:42 2006
New Revision: 8347

URL: http://svn.digium.com/view/asterisk?rev=8347&view=rev
Log:
fix invalid value of prev_q (issue #6302)

Modified:
    branches/1.2/apps/app_queue.c

Modified: branches/1.2/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/apps/app_queue.c?rev=8347&r1=8346&r2=8347&view=diff
==============================================================================
--- branches/1.2/apps/app_queue.c (original)
+++ branches/1.2/apps/app_queue.c Fri Jan 20 12:34:42 2006
@@ -763,20 +763,17 @@
 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;
 	}
 



More information about the asterisk-commits mailing list