[pulseaudio-discuss] [PATCH 4/4] context: Document pa_context_connect() error handling.
Tanu Kaskinen
tanuk at iki.fi
Sun Jan 1 10:25:09 PST 2012
---
src/pulse/context.h | 19 ++++++++++++-------
1 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/src/pulse/context.h b/src/pulse/context.h
index b2d4133..d540299 100644
--- a/src/pulse/context.h
+++ b/src/pulse/context.h
@@ -201,13 +201,18 @@ int pa_context_is_pending(pa_context *c);
pa_context_state_t pa_context_get_state(pa_context *c);
/** Connect the context to the specified server. If server is NULL,
-connect to the default server. This routine may but will not always
-return synchronously on error. Use pa_context_set_state_callback() to
-be notified when the connection is established. If flags doesn't have
-PA_CONTEXT_NOAUTOSPAWN set and no specific server is specified or
-accessible a new daemon is spawned. If api is non-NULL, the functions
-specified in the structure are used when forking a new child
-process. */
+ * connect to the default server. This routine may but will not always
+ * return synchronously on error. Use pa_context_set_state_callback() to
+ * be notified when the connection is established. If flags doesn't have
+ * PA_CONTEXT_NOAUTOSPAWN set and no specific server is specified or
+ * accessible a new daemon is spawned. If api is non-NULL, the functions
+ * specified in the structure are used when forking a new child
+ * process.
+ *
+ * Returns a negative error code on failure. If the PA_CONTEXT_NOFAIL
+ * flag is specified, then PA_ERR_CONNECTIONREFUSED should not be
+ * considered a fatal error unless pa_context_get_state() returns
+ * PA_CONTEXT_FAILED. */
int pa_context_connect(pa_context *c, const char *server, pa_context_flags_t flags, const pa_spawn_api *api);
/** Terminate the context connection immediately */
--
1.7.7.3
More information about the pulseaudio-discuss
mailing list