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

Joshua Colp asteriskteam at digium.com
Wed Jul 5 18:46:10 CDT 2017


Joshua Colp has submitted this change and it was merged. ( 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(-)

Approvals:
  Joshua Colp: Looks good to me, but someone else must approve; Approved for Submit
  George Joseph: Looks good to me, approved



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: merged
Gerrit-Change-Id: Id3039e9a4e74e0cb359f636c9fd0c9740ebf7d9d
Gerrit-Change-Number: 5947
Gerrit-PatchSet: 1
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20170705/ae29d3fa/attachment.html>


More information about the asterisk-code-review mailing list