]> git.ipfire.org Git - thirdparty/asterisk.git/commit
Frame deferral: Re-queue deferred frames one-at-a-time. 31/4531/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 18:01:58 +0000 (13:01 -0500)
commit2bc0b595a1312382947694d1a0a3d64d5c0bb784
tree809ad97847fd488cd2637908cefa4cf63651c3f5
parent36d380d71c914299f5cb98565c8e3baac9fde9a0
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