mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-30 10:33:13 +00:00
remove duplicate atof() invokation
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26055 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
8
pbx.c
8
pbx.c
@@ -4950,8 +4950,8 @@ static int pbx_builtin_wait(struct ast_channel *chan, void *data)
|
|||||||
int ms;
|
int ms;
|
||||||
|
|
||||||
/* Wait for "n" seconds */
|
/* Wait for "n" seconds */
|
||||||
if (data && atof(data)) {
|
if (data && (ms = atof(data)) > 0) {
|
||||||
ms = atof(data) * 1000;
|
ms *= 1000;
|
||||||
return ast_safe_sleep(chan, ms);
|
return ast_safe_sleep(chan, ms);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
@@ -4985,8 +4985,8 @@ static int pbx_builtin_waitexten(struct ast_channel *chan, void *data)
|
|||||||
ast_moh_start(chan, opts[0]);
|
ast_moh_start(chan, opts[0]);
|
||||||
|
|
||||||
/* Wait for "n" seconds */
|
/* Wait for "n" seconds */
|
||||||
if (args.timeout && atof(args.timeout))
|
if (args.timeout && (ms = atof(args.timeout)) > 0)
|
||||||
ms = atof(args.timeout) * 1000;
|
ms *= 1000;
|
||||||
else if (chan->pbx)
|
else if (chan->pbx)
|
||||||
ms = chan->pbx->rtimeout * 1000;
|
ms = chan->pbx->rtimeout * 1000;
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user