]> git.ipfire.org Git - thirdparty/asterisk.git/commit
Frame deferral: Re-queue deferred frames one-at-a-time. 30/4530/1
authorMark Michelson <mmichelson@digium.com>
Wed, 30 Nov 2016 16:48:39 +0000 (10:48 -0600)
committerMark Michelson <mmichelson@digium.com>
Wed, 30 Nov 2016 16:48:39 +0000 (10:48 -0600)
commit17b0b91afa1aa6b8b503a75e96b054f13612356a
tree3309ff6f5d5f4b7ab67e6993ac7ed532178a0bd7
parenta33ed3327aa7530b9c9dbd98bd575f85c15ec8a4
Frame deferral: Re-queue deferred frames one-at-a-time.

The recent change that made frame deferral into an API had a behavior
change to it. When frame deferral was completed, we would take all of
the deferred frames and queue them all onto the channel in one call to
ast_queue_frame_head(). Before frame deferral was API-ized, places that
performed manual frame deferral would actually take each deferred frame
and queue them onto the channel.

This change in behavior caused the confbridge_recording test to start
failing consistently. Without going too crazily deep into the details,
a channel was getting "stuck" in an ast_safe_sleep(). An AMI redirect
was attempting to break it out of the sleep, but because there were more
frames in the channel read queue than expected, the channel ended up
being unable to break from its sleep loop.

By restoring the behavior of individual frame queuing after deferral,
the test starts passing again.

Note, this points to a potential underlying issue pointing to an
"unbalance" that can occur when queuing multiple frames at once,
and so a follow-up issue is being created to investigate that
possibility.

Change-Id: Ied5dacacda06d343dea751ed5814a03364fe5a7d
main/channel.c