[pulseaudio-discuss] [RFCv3 17/20] bluetooth: Do not process resume if acquire fails
jprvita at gmail.com
jprvita at gmail.com
Sun Apr 21 20:07:47 PDT 2013
From: João Paulo Rechi Vita <jprvita at openbossa.org>
---
src/modules/bluetooth/module-bluetooth-device.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/modules/bluetooth/module-bluetooth-device.c b/src/modules/bluetooth/module-bluetooth-device.c
index d234f15..6664c10 100644
--- a/src/modules/bluetooth/module-bluetooth-device.c
+++ b/src/modules/bluetooth/module-bluetooth-device.c
@@ -455,9 +455,12 @@ static int sink_process_msg(pa_msgobject *o, int code, void *data, int64_t offse
}
}
+ if (failed)
+ return -1;
+
r = pa_sink_process_msg(o, code, data, offset, chunk);
- return (r < 0 || !failed) ? r : -1;
+ return r;
}
/* Run from IO thread */
@@ -527,9 +530,12 @@ static int source_process_msg(pa_msgobject *o, int code, void *data, int64_t off
}
+ if (failed)
+ return -1;
+
r = pa_source_process_msg(o, code, data, offset, chunk);
- return (r < 0 || !failed) ? r : -1;
+ return r;
}
static void handle_transport_state_change(struct userdata *u, struct pa_bluetooth_transport *transport);
--
1.7.11.7
More information about the pulseaudio-discuss
mailing list