]> code.delx.au - pulseaudio/commitdiff
bluetooth: Do not unload module-bluetooth-device on ERR or HUP
authorFrédéric Dalleau <frederic.dalleau@linux.intel.com>
Tue, 4 Oct 2011 07:37:22 +0000 (09:37 +0200)
committerArun Raghavan <arun.raghavan@collabora.co.uk>
Wed, 2 Nov 2011 18:51:35 +0000 (00:21 +0530)
This happens in the following scenario :
An HandsfreeGateway connects RFCOMM and then SCO. A card appears in
PA and can be used. If for some reason, SCO is disconnected,
module-bluetooth-device is unloaded. The card will disappear, even
if RFCOMM is still connected. After that, it is not possible to
connect SCO again from PA.

src/modules/bluetooth/module-bluetooth-device.c

index ac76a196c7517666edcefa4cd6a8fa2c057e1932..81abcd6f1264287aa3c0526d38c2c2cac7ae759f 100644 (file)
@@ -1721,7 +1721,6 @@ static void thread_func(void *userdata) {
 fail:
     /* If this was no regular exit from the loop we have to continue processing messages until we receive PA_MESSAGE_SHUTDOWN */
     pa_log_debug("IO thread failed");
-    pa_asyncmsgq_post(u->thread_mq.outq, PA_MSGOBJECT(u->core), PA_CORE_MESSAGE_UNLOAD_MODULE, u->module, 0, NULL, NULL);
     pa_asyncmsgq_wait_for(u->thread_mq.inq, PA_MESSAGE_SHUTDOWN);
 
 finish: