]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
channel: Clear channel flag in error branch.
authorCorey Farrell <git@cfware.com>
Sat, 1 Jul 2017 04:57:31 +0000 (00:57 -0400)
committerCorey Farrell <git@cfware.com>
Sat, 1 Jul 2017 05:05:23 +0000 (00:05 -0500)
Clear channel flag AST_FLAG_END_DTMF_ONLY in ast_waitfordigit_full when
ast_read returns NULL.

ASTERISK-27100 #close

Change-Id: Id3039e9a4e74e0cb359f636c9fd0c9740ebf7d9d

main/channel.c

index 4323aed15e92f8291d3edeb7852c796cef5a9d0a..3e5674a05dabf1bb804ce2f8efecde3a4a743af6 100644 (file)
@@ -3557,8 +3557,12 @@ int ast_waitfordigit_full(struct ast_channel *c, int timeout_ms, int audiofd, in
                } else if (rchan) {
                        int res;
                        struct ast_frame *f = ast_read(c);
-                       if (!f)
+
+                       if (!f) {
+                               ast_channel_clear_flag(c, AST_FLAG_END_DTMF_ONLY);
+
                                return -1;
+                       }
 
                        switch (f->frametype) {
                        case AST_FRAME_DTMF_BEGIN: