[asterisk-bugs] [Asterisk 0018146]: ast_app_dtget inconsistency
Asterisk Bug Tracker
noreply at bugs.digium.com
Sat Oct 16 16:27:20 CDT 2010
A NOTE has been added to this issue.
======================================================================
https://issues.asterisk.org/view.php?id=18146
======================================================================
Reported By: dimas
Assigned To:
======================================================================
Project: Asterisk
Issue ID: 18146
Category: Core/General
Reproducibility: have not tried
Severity: minor
Priority: normal
Status: new
Asterisk Version: 1.6.2.13
JIRA:
Regression: No
Reviewboard Link:
SVN Branch (only for SVN checkouts, not tarball releases): N/A
SVN Revision (number only!):
Request Review:
======================================================================
Date Submitted: 2010-10-16 09:13 CDT
Last Modified: 2010-10-16 16:27 CDT
======================================================================
Summary: ast_app_dtget inconsistency
Description:
I noticed strange thing in the code decided to share. 1.6.2.13, main/app.c,
ast_app_dtget function at the very beginning it tries to configure the
timeout unless it is specified:
if (!timeout && chan->pbx) {
timeout = chan->pbx->dtimeoutms / 1000.0;
} else if (!timeout) {
timeout = 5;
}
Both branches indicate the final value for timeout is in seconds. However
I believe ast_waitfordigit accepts timeout in milliseconds.
And as I see when ast_app_dtget is called by builtin_atxfer, the timeout
passed is also in ms. So I guess the code above may be wrong.
======================================================================
----------------------------------------------------------------------
(0128123) schmidts (manager) - 2010-10-16 16:27
https://issues.asterisk.org/view.php?id=18146#c128123
----------------------------------------------------------------------
you are right, the timeout should not be in sec rather than ms but there is
only a small chance this part of code will ever be used.
only 3 functions call ast_app_dtget, one of this (grab_transfer) use a fix
param of 1000. The other both (builtin_blindxfer and atxfer) use
transferdigittimeout as param which is set to 3000 per default or by user
config.
atleast timeout is a int so doing a division by 1000.0 (which is a float
value) could cause wrong results at all.
please try my attached patch.
Issue History
Date Modified Username Field Change
======================================================================
2010-10-16 16:27 schmidts Note Added: 0128123
======================================================================
More information about the asterisk-bugs
mailing list