aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_queue.c
diff options
context:
space:
mode:
authorroot <root@f38db490-d61c-443f-a65b-d21fe96a405b>2006-05-20 03:06:40 +0000
committerroot <root@f38db490-d61c-443f-a65b-d21fe96a405b>2006-05-20 03:06:40 +0000
commit7cf9bf79653c952c68bf023499a4c8c2cf87813c (patch)
treebeab219ee88a7c714782fc07df0fb2472b197fc3 /apps/app_queue.c
parentb7cbdf521711fc608bd96577965da8963ba735dc (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.c8
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)