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

Jenkins2 asteriskteam at digium.com
Wed Jul 5 08:56:46 CDT 2017


Jenkins2 has submitted this change and it was merged. ( https://gerrit.asterisk.org/5945 )

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
  George Joseph: Looks good to me, approved
  Jenkins2: Approved for Submit



diff --git a/main/channel.c b/main/channel.c
index c5060b7..c6c035f 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -3557,8 +3557,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/5945
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: merged
Gerrit-Change-Id: Id3039e9a4e74e0cb359f636c9fd0c9740ebf7d9d
Gerrit-Change-Number: 5945
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/1a0292de/attachment.html>


More information about the asterisk-code-review mailing list