Fix typos (bug #3381)
authorMark Spencer <markster@digium.com>
Thu, 20 Jan 2005 22:59:50 +0000 (22:59 +0000)
committerMark Spencer <markster@digium.com>
Thu, 20 Jan 2005 22:59:50 +0000 (22:59 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4855 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_dial.c

index 810fec7..6eb4f17 100755 (executable)
@@ -1306,11 +1306,11 @@ static int retrydial_exec(struct ast_channel *chan, void *data)
                if (ast_test_flag(chan, AST_FLAG_MOH))
                        ast_moh_stop(chan);
 
-               if ((res = dial_exec(chan, dialdata)) == 0) {
+               if ((res = dial_exec_full(chan, dialdata, &peerflags)) == 0) {
                        if (ast_test_flag(&peerflags, DIAL_HALT_ON_DTMF)) {
                                if (!(res = ast_streamfile(chan, announce, chan->language)))
                                        res = ast_waitstream(chan, AST_DIGIT_ANY);
-                               if (!res) {
+                               if (!res && sleep) {
                                        if (!ast_test_flag(chan, AST_FLAG_MOH))
                                                ast_moh_start(chan, NULL);
                                        res = ast_waitfordigit(chan, sleep);
@@ -1318,8 +1318,12 @@ static int retrydial_exec(struct ast_channel *chan, void *data)
                        } else {
                                if (!(res = ast_streamfile(chan, announce, chan->language)))
                                        res = ast_waitstream(chan, "");
-                               if (!res) 
-                                       res = ast_safe_sleep(chan, sleep);
+                               if (sleep) {
+                                       if (!ast_test_flag(chan, AST_FLAG_MOH))
+                                               ast_moh_start(chan, NULL);
+                                       if (!res) 
+                                               res = ast_safe_sleep(chan, sleep);
+                               }
                        }
                }