git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@33
fefdeb5f-60dc-0310-8127-
8f9354f1896f
#define DEFAULT_MAX_LENGTH 20480
#define DEFAULT_PREBUF 4096
#define DEFAULT_TIMEOUT 5
+#define DEFAULT_SERVER "/tmp/foo"
struct pa_context {
char *name;
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;
}
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);
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);