summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pulse/context.c6
-rw-r--r--src/pulse/internal.h4
2 files changed, 6 insertions, 4 deletions
diff --git a/src/pulse/context.c b/src/pulse/context.c
index 13b6d573..28d17191 100644
--- a/src/pulse/context.c
+++ b/src/pulse/context.c
@@ -144,7 +144,6 @@ pa_context *pa_context_new_with_proplist(pa_mainloop_api *mainloop, const char *
if (name)
pa_proplist_sets(c->proplist, PA_PROP_APPLICATION_NAME, name);
- c->no_fail = FALSE;
c->system_bus = c->session_bus = NULL;
c->mainloop = mainloop;
c->client = NULL;
@@ -170,6 +169,8 @@ pa_context *pa_context_new_with_proplist(pa_mainloop_api *mainloop, const char *
c->do_shm = FALSE;
+ c->server_specified = FALSE;
+ c->no_fail = FALSE;
c->do_autospawn = FALSE;
memset(&c->spawn_api, 0, sizeof(c->spawn_api));
@@ -799,7 +800,7 @@ static int try_next_connection(pa_context *c) {
}
#endif
- if (c->no_fail) {
+ if (c->no_fail && !c->server_specified) {
if (!c->system_bus)
track_pulseaudio_on_dbus(c, DBUS_BUS_SYSTEM, &c->system_bus);
if (!c->session_bus)
@@ -917,6 +918,7 @@ int pa_context_connect(
pa_context_ref(c);
c->no_fail = flags & PA_CONTEXT_NOFAIL;
+ c->server_specified = !!server;
pa_assert(!c->server_list);
if (server) {
diff --git a/src/pulse/internal.h b/src/pulse/internal.h
index 8c242949..da94faa0 100644
--- a/src/pulse/internal.h
+++ b/src/pulse/internal.h
@@ -51,7 +51,6 @@
struct pa_context {
PA_REFCNT_DECLARE;
- pa_bool_t no_fail:1;
pa_dbus_wrap_connection *system_bus;
pa_dbus_wrap_connection *session_bus;
@@ -83,7 +82,8 @@ struct pa_context {
pa_bool_t is_local:1;
pa_bool_t do_shm:1;
-
+ pa_bool_t server_specified:1;
+ pa_bool_t no_fail:1;
pa_bool_t do_autospawn:1;
pa_spawn_api spawn_api;