From c005bd466651d8720aef3198d73bc0a3d459f953 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 11 Nov 2004 21:18:33 +0000 Subject: add username to runtime directory name in /tmp/ rework autospawning code and x11 credential publishing add support for IPv6 reenable LOWDELAY for tcp sockets git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@280 fefdeb5f-60dc-0310-8127-8f9354f1896f --- polyp/socket-util.c | 39 +-------------------------------------- 1 file changed, 1 insertion(+), 38 deletions(-) (limited to 'polyp/socket-util.c') diff --git a/polyp/socket-util.c b/polyp/socket-util.c index 96ea2c60..e0540179 100644 --- a/polyp/socket-util.c +++ b/polyp/socket-util.c @@ -114,7 +114,7 @@ int pa_socket_tcp_low_delay(int fd) { ret = pa_socket_low_delay(fd); on = 1; -/* + #if defined(SOL_TCP) || defined(IPPROTO_TCP) #if defined(SOL_TCP) if (setsockopt(fd, SOL_TCP, TCP_NODELAY, &on, sizeof(on)) < 0) @@ -123,7 +123,6 @@ int pa_socket_tcp_low_delay(int fd) { #endif ret = -1; #endif -*/ #if defined(IPTOS_LOWDELAY) && defined(IP_TOS) && (defined(SOL_IP) || \ defined(IPPROTO_IP)) @@ -204,42 +203,6 @@ int pa_unix_socket_remove_stale(const char *fn) { return 0; } -int pa_unix_socket_make_secure_dir(const char *fn) { - int ret = -1; - char *slash, *dir = pa_xstrdup(fn); - - if (!(slash = strrchr(dir, '/'))) - goto finish; - *slash = 0; - - if (pa_make_secure_dir(dir) < 0) - goto finish; - - ret = 0; - -finish: - pa_xfree(dir); - return ret; -} - -int pa_unix_socket_remove_secure_dir(const char *fn) { - int ret = -1; - char *slash, *dir = pa_xstrdup(fn); - - if (!(slash = strrchr(dir, '/'))) - goto finish; - *slash = 0; - - if (rmdir(dir) < 0) - goto finish; - - ret = 0; - -finish: - pa_xfree(dir); - return ret; -} - struct sockaddr *pa_resolve_server(const char *server, size_t *len, uint16_t nport) { struct sockaddr *sa; struct addrinfo hints, *result = NULL; -- cgit