From 175a3d25d0e8596d4ba0759aea3f89ee228e7d6d Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 6 Nov 2013 22:30:35 +0100 Subject: active: rework make_socket_fd() to be based on socket_address_listen() Among other things this makes sure we set SO_REUSEADDR which is immensely useful. --- src/shared/socket-util.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/shared/socket-util.h') diff --git a/src/shared/socket-util.h b/src/shared/socket-util.h index e0b85adf9f..0b9bf2fefc 100644 --- a/src/shared/socket-util.h +++ b/src/shared/socket-util.h @@ -73,6 +73,7 @@ bool socket_address_can_accept(const SocketAddress *a) _pure_; int socket_address_listen( const SocketAddress *a, + int flags, int backlog, SocketAddressBindIPv6Only only, const char *bind_to_device, @@ -80,16 +81,13 @@ int socket_address_listen( bool transparent, mode_t directory_mode, mode_t socket_mode, - const char *label, - int *ret); + const char *label); bool socket_address_is(const SocketAddress *a, const char *s, int type); bool socket_address_is_netlink(const SocketAddress *a, const char *s); bool socket_address_matches_fd(const SocketAddress *a, int fd); -int make_socket_fd(const char* address, int flags); - bool socket_address_equal(const SocketAddress *a, const SocketAddress *b) _pure_; const char* socket_address_get_path(const SocketAddress *a); -- cgit v1.2.3-54-g00ecf