]> code.delx.au - pulseaudio/blobdiff - src/pulsecore/pipe.c
Merge commit 'origin/master-tx'
[pulseaudio] / src / pulsecore / pipe.c
index 41ffb693bc53f42fe4e56714bd2457f12d820970..93d78a22b0fef57ab2256b5216784255b649d95e 100644 (file)
@@ -1,18 +1,18 @@
-/* $Id$ */
-
 /***
   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 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
@@ -142,19 +142,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 */