[Home]

Summary:ASTERISK-13394: Queue timeout default is wrong
Reporter:Tim King (timking)Labels:
Date Opened:2009-01-19 07:49:33.000-0600Date Closed:2009-01-20 15:57:34.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Applications/app_queue
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:q->timeout is initialised to -1 rather than TIMEOUT_DEFAULT.

****** ADDITIONAL INFORMATION ******

q->timeout is initialised to -1. If you set it in the config file then any attempt to set it negative results in it having the value TIMEOUT_DEFAULT.

The logic test
if (qe->expire && (!qe->parent->timeout || (qe->expire - now) <= qe->parent->timeout))
                       to = (qe->expire - now) * 1000;
doesn't work when timeout is -1.

q->timeout should be initialised to TIMEOUT_DEFAULT.
Comments:By: Mark Michelson (mmichelson) 2009-01-20 15:56:25.000-0600

You are correct about this problem, and I will have it fixed shortly.

This problem exists in Asterisk 1.4 and 1.6.0 as well, but since they have been released and people may be depending on the "incorrect" behavior of the queue application, I am not going to change this there. I will only be applying this change to trunk and the 1.6.1 branch.

By: Digium Subversion (svnbot) 2009-01-20 15:57:08.000-0600

Repository: asterisk
Revision: 169574

U   trunk/apps/app_queue.c

------------------------------------------------------------------------
r169574 | mmichelson | 2009-01-20 15:57:08 -0600 (Tue, 20 Jan 2009) | 6 lines

Use the default timeout for a queue instead of -1

(closes issue ASTERISK-13394)
Reported by: timking


------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=169574

By: Digium Subversion (svnbot) 2009-01-20 15:57:33.000-0600

Repository: asterisk
Revision: 169575

_U  branches/1.6.1/
U   branches/1.6.1/apps/app_queue.c

------------------------------------------------------------------------
r169575 | mmichelson | 2009-01-20 15:57:33 -0600 (Tue, 20 Jan 2009) | 14 lines

Merged revisions 169574 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r169574 | mmichelson | 2009-01-20 15:57:24 -0600 (Tue, 20 Jan 2009) | 6 lines

Use the default timeout for a queue instead of -1

(closes issue ASTERISK-13394)
Reported by: timking


........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=169575