[pulseaudio-discuss] [PATCH] context: pa_context_connect() with PA_CONTEXT_NOFAIL should return 0 when waiting for PA on D-Dus
Peter Meerwald
pmeerw at pmeerw.net
Sat Nov 15 06:38:38 PST 2014
see
https://bugs.freedesktop.org/show_bug.cgi?id=85011
in case NOAUTOSPAWN is set and no server has been specified, PA starts listening on DBUS
for a new server, and the state is PA_CONTEXT_CONNECTING, but pa_context_connect()
returns -1; it should return 0.
Signed-off-by: Peter Meerwald <pmeerw at pmeerw.net>
---
src/pulse/context.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/pulse/context.c b/src/pulse/context.c
index d5da9b8..374da71 100644
--- a/src/pulse/context.c
+++ b/src/pulse/context.c
@@ -816,6 +816,11 @@ static int try_next_connection(pa_context *c) {
track_pulseaudio_on_dbus(c, DBUS_BUS_SESSION, &c->session_bus);
if (!c->system_bus)
track_pulseaudio_on_dbus(c, DBUS_BUS_SYSTEM, &c->system_bus);
+
+ if (c->session_bus || c->system_bus) {
+ pa_log_debug("Waiting for PA on D-Bus...");
+ break;
+ }
} else
#endif
pa_context_fail(c, PA_ERR_CONNECTIONREFUSED);
--
1.9.1
More information about the pulseaudio-discuss
mailing list