From: Lennart Poettering Date: Wed, 23 Jun 2004 23:38:33 +0000 (+0000) Subject: minor compile work X-Git-Tag: v0.1~64 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b9e0fa84f3a327ffc395ac184686a78a95c2bb3b;p=platform%2Fupstream%2Fpulseaudio.git minor compile work git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@33 fefdeb5f-60dc-0310-8127-8f9354f1896f --- diff --git a/src/polyp.c b/src/polyp.c index fdff7f9..a373841 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; } diff --git a/src/socket-client.c b/src/socket-client.c index 812c43f..4285939 100644 --- a/src/socket-client.c +++ b/src/socket-client.c @@ -110,6 +110,7 @@ static int do_connect(struct socket_client *c, const struct sockaddr *sa, sockle struct socket_client* socket_client_new_ipv4(struct pa_mainloop_api *m, uint32_t address, uint16_t port) { struct socket_client *c; struct sockaddr_in sa; + assert(m && address && port); c = socket_client_new(m); assert(c); @@ -136,6 +137,7 @@ fail: struct socket_client* socket_client_new_unix(struct pa_mainloop_api *m, const char *filename) { struct socket_client *c; struct sockaddr_un sa; + assert(m && filename); c = socket_client_new(m); assert(c);