diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-07-03 12:40:26 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-07-03 12:40:26 +0000 |
commit | be06f432bf5b7dbf84ad2c776e72ea462edb0f0c (patch) | |
tree | 765b499893733209917a50dae970ac7833551048 | |
parent | 38e686ac7eac588a47231d37ce02714ef622e29d (diff) |
Merged revisions 73053 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
................
r73053 | tilghman | 2007-07-03 07:38:53 -0500 (Tue, 03 Jul 2007) | 10 lines
Merged revisions 73052 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r73052 | tilghman | 2007-07-03 07:34:14 -0500 (Tue, 03 Jul 2007) | 2 lines
RetryDial should accept a 0 argument, but it does not, because atoi does not distinguish between 0 and error (closes issue #10106)
........
................
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@73054 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | apps/app_dial.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c index 035604e67..e566f58a3 100644 --- a/apps/app_dial.c +++ b/apps/app_dial.c @@ -1846,7 +1846,7 @@ static int retrydial_exec(struct ast_channel *chan, void *data) if ((dialdata = strchr(announce, '|'))) { *dialdata++ = '\0'; - if ((sleep = atoi(dialdata))) { + if (sscanf(dialdata, "%d", &sleep) == 1) { sleep *= 1000; } else { ast_log(LOG_ERROR, "%s requires the numerical argument <sleep>\n",rapp); @@ -1854,7 +1854,7 @@ static int retrydial_exec(struct ast_channel *chan, void *data) } if ((dialdata = strchr(dialdata, '|'))) { *dialdata++ = '\0'; - if (!(loops = atoi(dialdata))) { + if (sscanf(dialdata, "%d", &loops) != 1) { ast_log(LOG_ERROR, "%s requires the numerical argument <loops>\n",rapp); goto done; } |