]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
automerge commit
authorAutomerge Script <automerge@asterisk.org>
Tue, 3 Jul 2007 13:26:27 +0000 (13:26 +0000)
committerAutomerge Script <automerge@asterisk.org>
Tue, 3 Jul 2007 13:26:27 +0000 (13:26 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@73096 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_dial.c

index d36677c2f5cc9892346b3bfe05f9d3e8d68934fd..834b7dc475bdc8a4e89b4d821de81762a1430c31 100644 (file)
@@ -1706,7 +1706,7 @@ static int retrydial_exec(struct ast_channel *chan, void *data)
        if ((dialdata = strchr(announce, '|'))) {
                *dialdata = '\0';
                dialdata++;
-               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);
@@ -1716,7 +1716,7 @@ static int retrydial_exec(struct ast_channel *chan, void *data)
                if ((dialdata = strchr(dialdata, '|'))) {
                        *dialdata = '\0';
                        dialdata++;
-                       if (!(loops = atoi(dialdata))) {
+                       if (sscanf(dialdata, "%d", &loops) != 1) {
                                ast_log(LOG_ERROR, "%s requires the numerical argument <loops>\n",rapp);
                                LOCAL_USER_REMOVE(u);
                                return -1;