]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
don't allow queue member devices to ring longer than the total queue timeout (issue...
authorKevin P. Fleming <kpfleming@digium.com>
Sat, 20 May 2006 02:35:53 +0000 (02:35 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Sat, 20 May 2006 02:35:53 +0000 (02:35 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@28968 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_queue.c

index 61cf456176b6a94930c4e8b293ff2128c96eefb8..4fd6b53640330a461a17a65c667786d3584061fc 100644 (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;
-       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)