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
This commit is contained in:
Kevin P. Fleming
2006-05-20 02:35:53 +00:00
parent 9123735599
commit e0989958cc

View File

@@ -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;
if (qe->expire && (!qe->parent->timeout || (qe->expire - now) <= qe->parent->timeout))
to = (qe->expire - now) * 1000;
else
to = -1;
to = (qe->parent->timeout) ? qe->parent->timeout * 1000 : -1;
ring_one(qe, outgoing, &numbusies);
ast_mutex_unlock(&qe->parent->lock);
if (use_weight)