From 396c377dbb011902841f7de7c0f50ab934c51ebc Mon Sep 17 00:00:00 2001 From: russell Date: Thu, 1 Dec 2005 01:19:04 +0000 Subject: fix queue weight feature - compare member interfaces instead of pointers to the members, since each queue has its own list of members. (issue #5863) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@7249 f38db490-d61c-443f-a65b-d21fe96a405b --- apps/app_queue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/app_queue.c b/apps/app_queue.c index ef8a1b2b7..7f28a6ece 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -1304,7 +1304,7 @@ static int compare_weight(struct ast_call_queue *rq, struct member *member) 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); -- cgit v1.2.3