diff options
Diffstat (limited to 'src/polyp.c')
-rw-r--r-- | src/polyp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/polyp.c b/src/polyp.c index fdff7f9c..a373841a 100644 --- a/src/polyp.c +++ b/src/polyp.c @@ -15,6 +15,7 @@ #define DEFAULT_MAX_LENGTH 20480 #define DEFAULT_PREBUF 4096 #define DEFAULT_TIMEOUT 5 +#define DEFAULT_SERVER "/tmp/foo" struct pa_context { char *name; @@ -212,7 +213,7 @@ int pa_context_connect(struct pa_context *c, const char *server, void (*complete assert(c && c->state == CONTEXT_UNCONNECTED); assert(!c->client); - if (!(c->client = socket_client_new_unix(c->mainloop, server))) { + if (!(c->client = socket_client_new_unix(c->mainloop, server ? server : DEFAULT_SERVER))) { c->errno = PA_ERROR_CONNECTIONREFUSED; return -1; } |