[Asterisk-code-review] channel: Clear channel flag in error branch. (asterisk[master])

Corey Farrell asteriskteam at digium.com
Sat Jul 1 00:05:43 CDT 2017


Corey Farrell has uploaded this change for review. ( https://gerrit.asterisk.org/5947


Change subject: channel: Clear channel flag in error branch.
......................................................................

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
---
M main/channel.c
1 file changed, 5 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/47/5947/1

diff --git a/main/channel.c b/main/channel.c
index c7c2b9d..1a591bd 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -3262,8 +3262,12 @@
 		} 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:

-- 
To view, visit https://gerrit.asterisk.org/5947
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id3039e9a4e74e0cb359f636c9fd0c9740ebf7d9d
Gerrit-Change-Number: 5947
Gerrit-PatchSet: 1
Gerrit-Owner: Corey Farrell <git at cfware.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20170701/3d384ce0/attachment.html>


More information about the asterisk-code-review mailing list