]> code.delx.au - pulseaudio/blobdiff - src/pulsecore/iochannel.c
handle failure to parse proplist in cli-command gracefully
[pulseaudio] / src / pulsecore / iochannel.c
index 63ab2ad716f765ba1906d62d1f93571aff5d16ae..b40c9815643db5a524b14c3714eda2d875aeda65 100644 (file)
@@ -1,5 +1,3 @@
-/* $Id$ */
-
 /***
   This file is part of PulseAudio.
 
@@ -424,3 +422,16 @@ int pa_iochannel_get_send_fd(pa_iochannel *io) {
 
     return io->ofd;
 }
+
+pa_bool_t pa_iochannel_socket_is_local(pa_iochannel *io) {
+    pa_assert(io);
+
+    if (pa_socket_is_local(io->ifd))
+        return TRUE;
+
+    if (io->ifd != io->ofd)
+        if (pa_socket_is_local(io->ofd))
+            return TRUE;
+
+    return FALSE;
+}