[svn-commits] file: trunk r181612 - /trunk/apps/app_dial.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Mar 12 08:24:20 CDT 2009


Author: file
Date: Thu Mar 12 08:24:12 2009
New Revision: 181612

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=181612
Log:
Fix crash when sleep and retries argument was not given to RetryDial application.

(closes issue #14647)
Reported by: sherpya

Modified:
    trunk/apps/app_dial.c

Modified: trunk/apps/app_dial.c
URL: http://svn.digium.com/svn-view/asterisk/trunk/apps/app_dial.c?view=diff&rev=181612&r1=181611&r2=181612
==============================================================================
--- trunk/apps/app_dial.c (original)
+++ trunk/apps/app_dial.c Thu Mar 12 08:24:12 2009
@@ -2268,10 +2268,12 @@
 	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);




More information about the svn-commits mailing list