Merged revisions 80539 via svnmerge from

https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r80539 | russell | 2007-08-23 14:21:53 -0500 (Thu, 23 Aug 2007) | 4 lines

Fix func_timeout to take values in floating point so 1.5 actually means
1.5 seconds instead of being rounded.
(closes issue #10540, reported by spendergrass, patch by me)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@80540 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.6.0
Russell Bryant 18 years ago
parent c50975fd06
commit 558d533388

@ -90,6 +90,7 @@ static int timeout_read(struct ast_channel *chan, const char *cmd, char *data,
static int timeout_write(struct ast_channel *chan, const char *cmd, char *data,
const char *value)
{
float f;
int x;
char timestr[64];
struct ast_tm myt;
@ -105,7 +106,10 @@ static int timeout_write(struct ast_channel *chan, const char *cmd, char *data,
if (!value)
return -1;
x = atoi(value);
f = atof(value);
if (f < 0)
f = 1.0;
x = (int) (f * 1000);
switch (*data) {
case 'a':

Loading…
Cancel
Save