aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_dial.c
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2009-03-12 13:28:39 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2009-03-12 13:28:39 +0000
commit5bffded7111ec94111b2ab08fe3cc4f132bd2176 (patch)
tree6c50e2a2ecd0da3b86b463f402c214269ca1f3bb /apps/app_dial.c
parent085b834201c2c04f3782265dacb0759b2ea0715f (diff)
Merged revisions 181612 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r181612 | file | 2009-03-12 10:24:12 -0300 (Thu, 12 Mar 2009) | 5 lines 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/branches/1.6.1@181614 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_dial.c')
-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 26cc8b4a4..b2a31bf56 100644
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -2051,10 +2051,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);