From: Russell Bryant Date: Thu, 1 Dec 2005 01:17:41 +0000 (+0000) Subject: fix queue weight feature - compare member interfaces instead of pointers to X-Git-Tag: 1.4.0-beta1~3238 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ad122bf6cdb8b74dfd2babda5df6fc454e121262;p=thirdparty%2Fasterisk.git 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: https://origsvn.digium.com/svn/asterisk/trunk@7248 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_queue.c b/apps/app_queue.c index ef8a1b2b7d..7f28a6ece6 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);