[asterisk-commits] tilghman: trunk r73054 - in /trunk: ./ apps/app_dial.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jul 3 07:40:26 CDT 2007


Author: tilghman
Date: Tue Jul  3 07:40:26 2007
New Revision: 73054

URL: http://svn.digium.com/view/asterisk?view=rev&rev=73054
Log:
Merged revisions 73053 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r73053 | tilghman | 2007-07-03 07:38:53 -0500 (Tue, 03 Jul 2007) | 10 lines

Merged revisions 73052 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r73052 | tilghman | 2007-07-03 07:34:14 -0500 (Tue, 03 Jul 2007) | 2 lines

RetryDial should accept a 0 argument, but it does not, because atoi does not distinguish between 0 and error (closes issue #10106)

........

................

Modified:
    trunk/   (props changed)
    trunk/apps/app_dial.c

Propchange: trunk/
            ('branch-1.2-merged' removed)

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_dial.c?view=diff&rev=73054&r1=73053&r2=73054
==============================================================================
--- trunk/apps/app_dial.c (original)
+++ trunk/apps/app_dial.c Tue Jul  3 07:40:26 2007
@@ -1846,7 +1846,7 @@
 
 	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);
@@ -1854,7 +1854,7 @@
 		}
 		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;
 			}




More information about the asterisk-commits mailing list