]> code.delx.au - pulseaudio/commit
bluetooth: Fix crash on disconnection
authorFrédéric Danis <frederic.danis@linux.intel.com>
Tue, 15 May 2012 13:55:36 +0000 (15:55 +0200)
committerTanu Kaskinen <tanuk@iki.fi>
Wed, 16 May 2012 03:26:00 +0000 (06:26 +0300)
commit21b1d92b793b0c6d987ccd10ec80805cb5246155
tree0d4d609ea5cb88a53dd17f66ee94bb1ec7c98673
parent1a6c9dc0a4f695764d48f06ac17ced42b7432499
bluetooth: Fix crash on disconnection

When a Bluetooth headset is connected only to HFP profile (not connected
to A2DP) and host streams to it, a crash occurs if host disconnects.

When HFP disconnects, audio thread will fail on POLLHUP then generate
a message to set PA profile to Off before ending.
If this message is managed before PA unload bluetooth device module,
all works fine.
But, if this message is managed during module unload, this finish by
re-entrance in release code (stop_thread) and a crash.

This fix prevents to process profile change when module is unloading.
src/modules/bluetooth/module-bluetooth-device.c