aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2005-12-01 01:19:04 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2005-12-01 01:19:04 +0000
commit396c377dbb011902841f7de7c0f50ab934c51ebc (patch)
treee275d3547f6d4d61d78c7bf03af6e2a03f089a66 /apps
parent1c300f59bbbfc59d9fcc1c3b370da1a3906378bc (diff)
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
Diffstat (limited to 'apps')
-rw-r--r--apps/app_queue.c2
1 files changed, 1 insertions, 1 deletions
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);