diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-05-20 02:35:53 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-05-20 02:35:53 +0000 |
commit | 6f39f98a0e1784c8eb4ad967a3feb9f3cfdd224e (patch) | |
tree | c5b766aac36c15a2274ddcb4cb6f9583f0365bce | |
parent | dbe06afe0a5791dafe565da85bb20098ff3a83bf (diff) |
don't allow queue member devices to ring longer than the total queue timeout (issue #6423, reported and patched by bcnit)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@28968 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | apps/app_queue.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c index 61cf45617..4fd6b5364 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) |