aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2009-03-12 13:24:12 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2009-03-12 13:24:12 +0000
commit184b93f3da90a7c810ce6562cf3b75af021705a6 (patch)
tree7bf0a192087278d25442b5d571566bfc1107ac49 /apps
parent26cd566e368df1f15f09bdef735ecf94fd9c4793 (diff)
Fix crash when sleep and retries argument was not given to RetryDial application.
(closes issue #14647) Reported by: sherpya git-svn-id: http://svn.digium.com/svn/asterisk/trunk@181612 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r--apps/app_dial.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c
index db627ddd0..3466f41d5 100644
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -2268,10 +2268,12 @@ static int retrydial_exec(struct ast_channel *chan, void *data)
parse = ast_strdupa(data);
AST_STANDARD_APP_ARGS(args, parse);
- if ((sleepms = atoi(args.sleep)))
+ if (!ast_strlen_zero(args.sleep) && (sleepms = atoi(args.sleep)))
sleepms *= 1000;
- loops = atoi(args.retries);
+ if (!ast_strlen_zero(args.retries)) {
+ loops = atoi(args.retries);
+ }
if (!args.dialdata) {
ast_log(LOG_ERROR, "%s requires a 4th argument (dialdata)\n", rapp);