]> git.tuebingen.mpg.de Git - paraslash.git/commit
audiod: Handle crashes of para_server more robustly.
authorAndre Noll <maan@systemlinux.org>
Sun, 10 Oct 2010 19:32:58 +0000 (21:32 +0200)
committerAndre Noll <maan@systemlinux.org>
Sun, 10 Oct 2010 19:32:58 +0000 (21:32 +0200)
commitfd09012ca62c214fb3e2f48935e658b885c967b6
treea0173802ce758e17e2e703ef9f9530ba626ef7ff
parent3db64b098184e08bfac7939775ad9db9ebfc72fb
audiod: Handle crashes of para_server more robustly.

In case para_server dies unexpectedly, para_audiod may still have a partial status
item in the buffer tree node of the client task which can lead to a busy loop.

Fix this by flushing the input queue and invalidate the current audio format to prevent
recreating a buffer tree before the status task resumes.

There is already flush_input_queue() in buffer_tree.c but that can't be called by audiod.c
as it is a static function. Make it public and rename it to btr_drain() which is shorter and
more to the point and has the usual btr_ prefix.
audiod.c
buffer_tree.c
buffer_tree.h