summaryrefslogtreecommitdiff
path: root/main/message.c
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2016-12-12 18:38:42 -0600
committerRichard Mudgett <rmudgett@digium.com>2016-12-14 11:38:06 -0600
commit44e72c9d44c37a29dda73abc7bdca1cb34252555 (patch)
treeae954ebe07271e3adf6f2d14c0f2bb09bf18acb5 /main/message.c
parent31268e0a280110748f33314a2c09563c576243de (diff)
MESSAGE: Flush Message/ast_msg_queue channel alert pipe.
ASTERISK-25083 Change-Id: Id54baa57a8dbca84e29f28bcd2ffc0a5ac12d8b2
Diffstat (limited to 'main/message.c')
-rw-r--r--main/message.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/main/message.c b/main/message.c
index a326fb97e..a6b048828 100644
--- a/main/message.c
+++ b/main/message.c
@@ -775,11 +775,20 @@ static void chan_cleanup(struct ast_channel *chan)
if (msg_ds) {
ast_channel_datastore_add(chan, msg_ds);
}
+
/*
* Clear softhangup flags.
*/
ast_channel_clear_softhangup(chan, AST_SOFTHANGUP_ALL);
+ /*
+ * Flush the alert pipe in case we miscounted somewhere when
+ * messing with frames on the read queue, we had to flush the
+ * read queue above, or we had an "Exceptionally long queue
+ * length" event.
+ */
+ ast_channel_internal_alert_flush(chan);
+
ast_channel_unlock(chan);
}