aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2007-07-03 12:38:53 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2007-07-03 12:38:53 +0000
commit2359bafc84b432ae1067a1fd8cdfb2aa97ce53b9 (patch)
tree82e64dbf22b1b5b33921e25408115164a7ba9603 /apps
parentb722d7863d7b9107dc376aa815e8b1fced01a3d4 (diff)
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/branches/1.4@73053 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r--apps/app_dial.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c
index 74b51d974..b95831869 100644
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -1726,7 +1726,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);
@@ -1734,7 +1734,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;
}