summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2006-04-19 11:54:43 +0000
committerPierre Ossman <ossman@cendio.se>2006-04-19 11:54:43 +0000
commit5342f3aef17f857dac1f6a4dd2329a301a568f1e (patch)
tree1ddc9b42d70074c3add7c5c06c59d0ea9596c02b
parent6ae8511a66c0f937bdab2786ecdc7e158bd3934d (diff)
Win32 needs to have the socket subsystem initialised.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@758 fefdeb5f-60dc-0310-8127-8f9354f1896f
-rw-r--r--src/polyp/context.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/polyp/context.c b/src/polyp/context.c
index 448e2e68..ff224547 100644
--- a/src/polyp/context.c
+++ b/src/polyp/context.c
@@ -141,6 +141,13 @@ pa_context *pa_context_new(pa_mainloop_api *mainloop, const char *name) {
pa_client_conf_from_x11(c->conf, NULL);
#endif
pa_client_conf_env(c->conf);
+
+#ifdef OS_IS_WIN32
+ {
+ WSADATA data;
+ WSAStartup(MAKEWORD(2, 0), &data);
+ }
+#endif
return c;
}
@@ -180,6 +187,10 @@ static void context_free(pa_context *c) {
pa_xfree(c->name);
pa_xfree(c->server);
pa_xfree(c);
+
+#ifdef OS_IS_WIN32
+ WSACleanup();
+#endif
}
pa_context* pa_context_ref(pa_context *c) {