]> code.delx.au - pulseaudio/blobdiff - src/pulsecore/pipe.c
remap: Change remapping function argument type from void to int16_t / float as approp...
[pulseaudio] / src / pulsecore / pipe.c
index 6933e180df9a96ca07fae03e7d5dd40b87b1703c..f873ef6bb37d131453a5691b5957453567da2c27 100644 (file)
@@ -1,22 +1,22 @@
-/* $Id$ */
-
 /***
-   This file is part of PulseAudio.
-
-   PulseAudio is free software; you can redistribute it and/or modify it
-   under the terms of the GNU Library General Public License as published
-   by the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   PulseAudio is distributed in the hope that it will be useful, but
-   WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public
-   License along with PulseAudio; If not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-   USA.
+  This file is part of PulseAudio.
+
+  Copyright 2006-2007 Pierre Ossman <ossman@cendio.se> for Cendio AB
+
+  PulseAudio is free software; you can redistribute it and/or modify
+  it under the terms of the GNU Lesser General Public License as published
+  by the Free Software Foundation; either version 2.1 of the License,
+  or (at your option) any later version.
+
+  PulseAudio is distributed in the hope that it will be useful, but
+  WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public License
+  along with PulseAudio; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+  USA.
 ***/
 
 #ifdef HAVE_CONFIG_H
 
 #include <sys/types.h>
 
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-
-#include "winsock.h"
+#include <pulsecore/socket.h>
+#include <pulsecore/core-util.h>
 
 #include "pipe.h"
 
@@ -142,19 +139,19 @@ int pipe(int filedes[2]) {
     if ((addr.sin_port != peer.sin_port) || (addr.sin_addr.s_addr != peer.sin_addr.s_addr))
         goto error;
 
-    close(listener);
+    pa_close(listener);
 
     return 0;
 
 error:
-       if (listener >= 0)
-               close(listener);
-       if (filedes[0] >= 0)
-               close(filedes[0]);
-       if (filedes[1] >= 0)
-               close(filedes[0]);
-
-       return -1;
+        if (listener >= 0)
+                pa_close(listener);
+        if (filedes[0] >= 0)
+                pa_close(filedes[0]);
+        if (filedes[1] >= 0)
+                pa_close(filedes[0]);
+
+        return -1;
 }
 
 #endif /* HAVE_PIPE */