]> code.delx.au - pulseaudio/blobdiff - polyp/module-protocol-stub.c
Merge Pierre's changes
[pulseaudio] / polyp / module-protocol-stub.c
index be27b8e2c128abf9bbd6f3a8c2653ebe47143dc5..141eadd390f8a047b8afc770c16ddfb8902e5359 100644 (file)
 #include <errno.h>
 #include <stdio.h>
 #include <assert.h>
-#include <arpa/inet.h>
 #include <unistd.h>
+#include <limits.h>
+
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_ARPA_INET_H
+#include <arpa/inet.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
+#endif
+
+#include "winsock.h"
 
 #include "module.h"
 #include "socket-server.h"
@@ -240,5 +251,12 @@ finish:
 void pa__done(struct pa_core *c, struct pa_module*m) {
     assert(c && m);
 
+#if defined(USE_PROTOCOL_ESOUND)
+       if (remove (ESD_UNIX_SOCKET_NAME) != 0)
+               pa_log("%s: Failed to remove %s : %s.\n", __FILE__, ESD_UNIX_SOCKET_NAME, strerror (errno));
+       if (remove (ESD_UNIX_SOCKET_DIR) != 0)
+               pa_log("%s: Failed to remove %s : %s.\n", __FILE__, ESD_UNIX_SOCKET_DIR, strerror (errno));
+#endif
+
     protocol_free(m->userdata);
 }