Skip to content
Snippets Groups Projects
Commit dadfe716 authored by Mark Michelson's avatar Mark Michelson
Browse files

Fixing app_read so that if a timeout of less than 1 ms is specified,

assume that 1 ms is desired.

(closes issue #11000, reported and patched by michael-fig, with a warning line added by me)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@85965 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent bece7e24
No related branches found
No related tags found
No related merge requests found
...@@ -127,8 +127,14 @@ static int read_exec(struct ast_channel *chan, void *data) ...@@ -127,8 +127,14 @@ static int read_exec(struct ast_channel *chan, void *data)
tosec = atof(arglist.timeout); tosec = atof(arglist.timeout);
if (tosec <= 0) if (tosec <= 0)
to = 0; to = 0;
else else {
to = tosec * 1000.0; to = tosec * 1000.0;
if (to <= 0) {
/* Make sure we don't use the default timeout. */
ast_log(LOG_WARNING, "Read timeout less than 1 ms, assuming 1 ms timeout\n");
to = 1;
}
}
} }
if (ast_strlen_zero(arglist.filename)) { if (ast_strlen_zero(arglist.filename)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment