From: Kevin P. Fleming Date: Sat, 20 May 2006 02:35:53 +0000 (+0000) Subject: don't allow queue member devices to ring longer than the total queue timeout (issue... X-Git-Tag: 1.2.9.1~46 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e0989958cc69c54d85c3ad53774cca2e2ae04db6;p=thirdparty%2Fasterisk.git don't allow queue member devices to ring longer than the total queue timeout (issue #6423, reported and patched by bcnit) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@28968 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_queue.c b/apps/app_queue.c index 61cf456176..4fd6b53640 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -2125,10 +2125,10 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce cur = cur->next; } - if (qe->parent->timeout) - to = qe->parent->timeout * 1000; - else - to = -1; + if (qe->expire && (!qe->parent->timeout || (qe->expire - now) <= qe->parent->timeout)) + to = (qe->expire - now) * 1000; + else + to = (qe->parent->timeout) ? qe->parent->timeout * 1000 : -1; ring_one(qe, outgoing, &numbusies); ast_mutex_unlock(&qe->parent->lock); if (use_weight)