]> git.tuebingen.mpg.de Git - paraslash.git/commit
audiod: Don't init slot info unless opening the receiver succeeds.
authorAndre Noll <maan@systemlinux.org>
Wed, 10 Mar 2010 07:56:55 +0000 (08:56 +0100)
committerAndre Noll <maan@systemlinux.org>
Wed, 10 Mar 2010 07:56:55 +0000 (08:56 +0100)
commitbb62e1e588651b9f29aeb118942b6b7745373f76
tree06b89c6b6ab90ccfa1d974dcf74a6ee187916d12
parenteecc102ad0abeb0335fe994bb72031a15b9090d7
audiod: Don't init slot info unless opening the receiver succeeds.

Currently we set the slot's audio format number even if the receiver could not
be opened. This confuses the slot clearing code as no writer is active in
this case which triggers the assertion

para_audiod: audiod.c:384: close_writers: Assertion `s->wns'

Fix it by not touching the slot info structure unless we have successfully started
the receiver. Also perform some minor cleanups while we're at it.

Thanks to Gerrit Renker for pointing out this bug.
audiod.c