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

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


Author: russell
Date: Wed Nov 30 19:19:04 2005
New Revision: 7249

URL: http://svn.digium.com/view/asterisk?rev=7249&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:
    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=7249&r1=7248&r2=7249&view=diff
==============================================================================
--- branches/1.2/apps/app_queue.c (original)
+++ branches/1.2/apps/app_queue.c Wed Nov 30 19:19:04 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