threaded-mainloop: Properly initialise m->n_waiting_for_accept to prevent deadlock
commitc5fdbeab85dfe69ebaec92969ec2ce77b105f1df
authorDaniel T Chen <crimsun@ubuntu.com>
Tue, 5 Jan 2010 02:44:37 +0000 (4 21:44 -0500)
committerLennart Poettering <lennart@poettering.net>
Tue, 5 Jan 2010 18:57:16 +0000 (5 19:57 +0100)
tree8807e49ebd39acf362daf70c071c7c8a0bffff3f
parenta63cf050b0be91310ae6b0b4fa3fa2b0f95e3efa
threaded-mainloop: Properly initialise m->n_waiting_for_accept to prevent deadlock

Compiler optimisations have been seen to initialise
m->n_waiting_for_accept to a positive non-zero value, so the while() in
pa_threaded_mainloop_signal() never proceeds. Fix this by properly
initializing m->n_waiting_for_accept in pa_threaded_mainloop_new().

Patch from Iain Bucław.

https://bugs.launchpad.net/bugs/502992
src/pulse/thread-mainloop.c