diff options
author | root <root@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-05-20 03:06:40 +0000 |
---|---|---|
committer | root <root@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-05-20 03:06:40 +0000 |
commit | 7cf9bf79653c952c68bf023499a4c8c2cf87813c (patch) | |
tree | beab219ee88a7c714782fc07df0fb2472b197fc3 /apps/app_queue.c | |
parent | b7cbdf521711fc608bd96577965da8963ba735dc (diff) |
automerge commit
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2-netsec@29006 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_queue.c')
-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) |