From dd4000671808df746a3fd29090aad8cf939cf512 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 19 Mar 2009 18:05:26 +0100 Subject: document things that need to be fixed with FIXME --- src/modules/bluetooth/bluetooth-util.c | 4 ++++ src/modules/bluetooth/module-bluetooth-device.c | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/modules/bluetooth/bluetooth-util.c b/src/modules/bluetooth/bluetooth-util.c index 912697e6..ccc8bee3 100644 --- a/src/modules/bluetooth/bluetooth-util.c +++ b/src/modules/bluetooth/bluetooth-util.c @@ -114,6 +114,8 @@ void pa_bluetooth_device_free(pa_bluetooth_device *d) { static pa_bool_t device_is_loaded(pa_bluetooth_device *d) { pa_assert(d); + /* FIXME: e83621724d7939b97b4f01f0d7e965d61ef8e55e, f1daa282f030e4e2381341e0f65faca47c4b891b is borked, probably needs to be reversed */ + return d->device_info_valid && (d->audio_sink_info_valid || d->headset_info_valid); } @@ -123,6 +125,8 @@ static pa_bool_t device_is_audio(pa_bluetooth_device *d) { pa_assert(d->device_info_valid); pa_assert(d->audio_sink_info_valid || d->headset_info_valid); + /* FIXME: e83621724d7939b97b4f01f0d7e965d61ef8e55e, f1daa282f030e4e2381341e0f65faca47c4b891b is borked, probably needs to be reversed */ + return d->device_info_valid > 0 && (d->audio_sink_info_valid > 0 || d->headset_info_valid > 0); } diff --git a/src/modules/bluetooth/module-bluetooth-device.c b/src/modules/bluetooth/module-bluetooth-device.c index 1b61a6fc..8d066a95 100644 --- a/src/modules/bluetooth/module-bluetooth-device.c +++ b/src/modules/bluetooth/module-bluetooth-device.c @@ -876,7 +876,7 @@ static int hsp_process_render(struct userdata *u) { pa_assert(l != 0); if (l < 0) { - if (errno == EINTR || errno == EAGAIN) + if (errno == EINTR || errno == EAGAIN) /*** FIXME: EAGAIN handling borked ***/ continue; else { pa_log_error("Failed to write data to SCO socket: %s", pa_cstrerror(errno)); @@ -921,7 +921,7 @@ static int hsp_process_push(struct userdata *u) { pa_memblock_release(memchunk.memblock); if (l <= 0) { - if (l < 0 && (errno == EINTR || errno == EAGAIN)) + if (l < 0 && (errno == EINTR || errno == EAGAIN)) /*** FIXME: EAGAIN handling borked ***/ continue; else { pa_log_error("Failed to read data from SCO socket: %s", l < 0 ? pa_cstrerror(errno) : "EOF"); @@ -1045,7 +1045,7 @@ static int a2dp_process_render(struct userdata *u) { pa_assert(l != 0); if (l < 0) { - if (errno == EINTR || errno == EAGAIN) + if (errno == EINTR || errno == EAGAIN) /*** FIXME: EAGAIN handling borked ***/ continue; else { pa_log_error("Failed to write data to socket: %s", pa_cstrerror(errno)); -- cgit