diff options
author | Joshua Colp <jcolp@digium.com> | 2009-03-12 13:24:12 +0000 |
---|---|---|
committer | Joshua Colp <jcolp@digium.com> | 2009-03-12 13:24:12 +0000 |
commit | 499ca8de651e578bae2d125d89b07acaa8ddb269 (patch) | |
tree | 7bf0a192087278d25442b5d571566bfc1107ac49 | |
parent | 7b8564ada6437852c40baeaefe56cd31da39d055 (diff) |
Fix crash when sleep and retries argument was not given to RetryDial application.
(closes issue #14647)
Reported by: sherpya
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@181612 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r-- | apps/app_dial.c | 6 |
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); |