[pulseaudio-commits] r2534 - in /trunk/src/pulsecore: iochannel.c iochannel.h

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Mon Jun 16 11:55:22 PDT 2008


Author: lennart
Date: Mon Jun 16 20:55:20 2008
New Revision: 2534

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=2534&root=pulseaudio&view=rev
Log:
add new function pa_iochannel_socket_is_local()

Modified:
    trunk/src/pulsecore/iochannel.c
    trunk/src/pulsecore/iochannel.h

Modified: trunk/src/pulsecore/iochannel.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/pulsecore/iochannel.c?rev=2534&root=pulseaudio&r1=2533&r2=2534&view=diff
==============================================================================
--- trunk/src/pulsecore/iochannel.c (original)
+++ trunk/src/pulsecore/iochannel.c Mon Jun 16 20:55:20 2008
@@ -424,3 +424,16 @@
 
     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;
+}

Modified: trunk/src/pulsecore/iochannel.h
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/pulsecore/iochannel.h?rev=2534&root=pulseaudio&r1=2533&r2=2534&view=diff
==============================================================================
--- trunk/src/pulsecore/iochannel.h (original)
+++ trunk/src/pulsecore/iochannel.h Mon Jun 16 20:55:20 2008
@@ -85,6 +85,8 @@
 int pa_iochannel_socket_set_rcvbuf(pa_iochannel*io, size_t l);
 int pa_iochannel_socket_set_sndbuf(pa_iochannel*io, size_t l);
 
+pa_bool_t pa_iochannel_socket_is_local(pa_iochannel *io);
+
 pa_mainloop_api* pa_iochannel_get_mainloop_api(pa_iochannel *io);
 
 int pa_iochannel_get_recv_fd(pa_iochannel *io);




More information about the pulseaudio-commits mailing list