summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorey Farrell <git@cfware.com>2017-07-01 00:57:31 -0400
committerCorey Farrell <git@cfware.com>2017-07-01 00:05:42 -0500
commit50ddb56dad7da1712c08505e409063d6e3bda7af (patch)
tree78b6ea2025fbd2b2e22780aeea4adaef998c5950
parentb62a3f0a67628e99cfceca36bafb1362788700ff (diff)
channel: Clear channel flag in error branch.
Clear channel flag AST_FLAG_END_DTMF_ONLY in ast_waitfordigit_full when ast_read returns NULL. ASTERISK-27100 #close Change-Id: Id3039e9a4e74e0cb359f636c9fd0c9740ebf7d9d
-rw-r--r--main/channel.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/main/channel.c b/main/channel.c
index c7c2b9d1e..1a591bd27 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -3262,8 +3262,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: