summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoão Paulo Rechi Vita <jprvita@openbossa.org>2014-02-04 17:52:15 -0300
committerJoão Paulo Rechi Vita <jprvita@gmail.com>2014-02-04 18:12:56 -0300
commitb09a91f71131dc0d98cf3dd1a01609fdbb2c62ab (patch)
treefb25ceff205543ab346ded92fd7c182cfc4d9780
parentef633588732e707e529213e8e356b2e44f12059f (diff)
bluetooth: Notify the main thread of a stream fd HUP
-rw-r--r--src/modules/bluetooth/module-bluez5-device.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/modules/bluetooth/module-bluez5-device.c b/src/modules/bluetooth/module-bluez5-device.c
index f1991a0b..e48eaa95 100644
--- a/src/modules/bluetooth/module-bluez5-device.c
+++ b/src/modules/bluetooth/module-bluez5-device.c
@@ -74,6 +74,7 @@ static const char* const valid_modargs[] = {
enum {
BLUETOOTH_MESSAGE_IO_THREAD_FAILED,
+ BLUETOOTH_MESSAGE_STREAM_FD_HUP,
BLUETOOTH_MESSAGE_MAX
};
@@ -1427,6 +1428,8 @@ io_fail:
pending_read_bytes = 0;
writable = false;
+ pa_asyncmsgq_post(pa_thread_mq_get()->outq, PA_MSGOBJECT(u->msg), BLUETOOTH_MESSAGE_STREAM_FD_HUP, NULL, 0, NULL, NULL);
+
teardown_stream(u);
}
@@ -1998,6 +2001,8 @@ static int device_process_msg(pa_msgobject *obj, int code, void *data, int64_t o
pa_log_debug("Switching the profile to off due to IO thread failure.");
pa_assert_se(pa_card_set_profile(m->card, pa_hashmap_get(m->card->profiles, "off"), false) >= 0);
break;
+ case BLUETOOTH_MESSAGE_STREAM_FD_HUP:
+ break;
}
return 0;