]> git.ipfire.org Git - thirdparty/asterisk.git/commit
Frame deferral: Re-queue deferred frames one-at-a-time. 33/4533/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 19:03:06 +0000 (14:03 -0500)
commit492b37429cf848cb61ede3118d2034248ef5de95
tree0d9f4bace027bc699cf417c8c3692390bd5bd311
parentd4d1909077a52102bf550f2aa20ff49b3d329fcc
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