diff options
Diffstat (limited to 'src/pulsecore/iochannel.c')
-rw-r--r-- | src/pulsecore/iochannel.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/pulsecore/iochannel.c b/src/pulsecore/iochannel.c index 63ab2ad7..717bc38c 100644 --- a/src/pulsecore/iochannel.c +++ b/src/pulsecore/iochannel.c @@ -424,3 +424,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; +} |