diff options
Diffstat (limited to 'apps')
-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 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; } |