From: Mark Michelson Date: Mon, 27 Aug 2007 14:55:44 +0000 (+0000) Subject: Found a case where the queue's membercount is off. It does not take into account... X-Git-Tag: 1.4.12~179 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fe5489eead1522a03347f2de272552bf5307be99;p=thirdparty%2Fasterisk.git Found a case where the queue's membercount is off. It does not take into account dynamic members on a reload. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@81010 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_queue.c b/apps/app_queue.c index 7b3538d195..298fab19e4 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -3926,8 +3926,11 @@ static int reload_queues(void) ast_log(LOG_DEBUG, "XXX Leaking a little memory :( XXX\n"); } else { ast_mutex_lock(&q->lock); - for (cur = q->members; cur; cur = cur->next) + for (cur = q->members; cur; cur = cur->next) { + if(cur->dynamic) + q->membercount++; cur->status = ast_device_state(cur->interface); + } ast_mutex_unlock(&q->lock); } }