memblockq: remove pa_memblockq_missing()
authorTanu Kaskinen <tanuk@iki.fi>
Fri, 30 Dec 2016 15:52:35 +0000 (17:52 +0200)
committerTanu Kaskinen <tanuk@iki.fi>
Tue, 3 Jan 2017 02:21:43 +0000 (04:21 +0200)
commit8e9f07074716b248a17b2d044f3a4d27a2e70a32
tree010d38cda827c5014da90e6bf778a729da2c7c40
parent11946a5be03d2cb914d83c683fb51d531fd63baf
memblockq: remove pa_memblockq_missing()

The function isn't used anywhere else than memblockq-test. Also, the
function is confusing, because it defines "missing" differently than
pa_memblockq_pop_missing(). pa_memblockq_missing() calculated the
missing amount like this:

    missing = tlength - length,

where "length" is the current queue length. pa_memblockq_pop_missing(),
on the other hand, calculates the missing amount like this:

    missing = tlength - length - requested,

where "requested" is an internal variable that keeps track of how much
the server has requested data from the client and how much of the
requests are yet to be fulfilled by the client.

memblockq-test is broken at the moment, because it assumes that
pa_memblockq_pop_missing() calculates "missing" the same way that
pa_memblockq_missing() used to calculate it. A patch for fixing that
will follow.
src/pulsecore/memblockq.c
src/pulsecore/memblockq.h
src/tests/memblockq-test.c