[asterisk-commits] trunk - r7248 /trunk/apps/app_queue.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Nov 30 19:17:42 CST 2005


Author: russell
Date: Wed Nov 30 19:17:41 2005
New Revision: 7248

URL: http://svn.digium.com/view/asterisk?rev=7248&view=rev
Log:
fix queue weight feature - compare member interfaces instead of pointers to
the members, since each queue has its own list of members. (issue #5863)

Modified:
    trunk/apps/app_queue.c

Modified: trunk/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_queue.c?rev=7248&r1=7247&r2=7248&view=diff
==============================================================================
--- trunk/apps/app_queue.c (original)
+++ trunk/apps/app_queue.c Wed Nov 30 19:17:41 2005
@@ -1304,7 +1304,7 @@
 		ast_mutex_lock(&q->lock);
 		if (q->count && q->members) {
 			for (mem = q->members; mem; mem = mem->next) {
-				if (mem == member) {
+				if (!strcmp(mem->interface, member->interface)) {
 					ast_log(LOG_DEBUG, "Found matching member %s in queue '%s'\n", mem->interface, q->name);
 					if (q->weight > rq->weight) {
 						ast_log(LOG_DEBUG, "Queue '%s' (weight %d, calls %d) is preferred over '%s' (weight %d, calls %d)\n", q->name, q->weight, q->count, rq->name, rq->weight, rq->count);



More information about the asterisk-commits mailing list