From f7a99e90470526bb28cc0c225f96490110094aed Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 10 Jan 2006 17:51:06 +0000 Subject: Merge Pierre's changes git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@445 fefdeb5f-60dc-0310-8127-8f9354f1896f --- polyp/polyplib-context.c | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) (limited to 'polyp/polyplib-context.c') diff --git a/polyp/polyplib-context.c b/polyp/polyplib-context.c index bca7d7ea..f97d9b82 100644 --- a/polyp/polyplib-context.c +++ b/polyp/polyplib-context.c @@ -28,13 +28,24 @@ #include #include #include -#include -#include #include #include #include -#include #include +#include + +#ifdef HAVE_SYS_WAIT_H +#include +#endif + +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_NETDB_H +#include +#endif + +#include "winsock.h" #include "polyplib-internal.h" #include "polyplib-context.h" @@ -110,8 +121,10 @@ struct pa_context *pa_context_new(struct pa_mainloop_api *mainloop, const char * c->autospawn_lock_fd = -1; memset(&c->spawn_api, 0, sizeof(c->spawn_api)); c->do_autospawn = 0; - + +#ifdef SIGPIPE pa_check_signal_is_blocked(SIGPIPE); +#endif c->conf = pa_client_conf_new(); pa_client_conf_load(c->conf, NULL); @@ -372,6 +385,8 @@ finish: static void on_connection(struct pa_socket_client *client, struct pa_iochannel*io, void *userdata); +#ifndef OS_IS_WIN32 + static int context_connect_spawn(struct pa_context *c) { pid_t pid; int status, r; @@ -485,6 +500,8 @@ fail: return -1; } +#endif /* OS_IS_WIN32 */ + static int try_next_connection(struct pa_context *c) { char *u = NULL; int r = -1; @@ -499,10 +516,12 @@ static int try_next_connection(struct pa_context *c) { if (!u) { +#ifndef OS_IS_WIN32 if (c->do_autospawn) { r = context_connect_spawn(c); goto finish; } +#endif pa_context_fail(c, PA_ERROR_CONNECTIONREFUSED); goto finish; -- cgit