diff options
author | Daniel Mack <github@zonque.org> | 2016-01-22 09:47:59 +0100 |
---|---|---|
committer | Daniel Mack <github@zonque.org> | 2016-01-22 09:47:59 +0100 |
commit | 371859d6b55478f1c8d04930f92d52b32ddfdf95 (patch) | |
tree | 9078a5ec96825fe1d3331c0b1ac5c0bfbb17f4c2 /src/basic | |
parent | 07313a18263ca6f2e2a49ee4fba79aa6249ff398 (diff) | |
parent | 366b7db4b65b994cd33cf4fd3c1be429be561307 (diff) |
Merge pull request #2080 from chaloulo/split-mode-host-remove-port-from-journal-filename
journal-remote: split-mode=host, remove port from journal filename
Diffstat (limited to 'src/basic')
-rw-r--r-- | src/basic/socket-util.c | 4 | ||||
-rw-r--r-- | src/basic/socket-util.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/basic/socket-util.c b/src/basic/socket-util.c index be144e157d..f2bb3bab86 100644 --- a/src/basic/socket-util.c +++ b/src/basic/socket-util.c @@ -601,7 +601,7 @@ int sockaddr_pretty(const struct sockaddr *_sa, socklen_t salen, bool translate_ return 0; } -int getpeername_pretty(int fd, char **ret) { +int getpeername_pretty(int fd, bool include_port, char **ret) { union sockaddr_union sa; socklen_t salen = sizeof(sa); int r; @@ -631,7 +631,7 @@ int getpeername_pretty(int fd, char **ret) { /* For remote sockets we translate IPv6 addresses back to IPv4 * if applicable, since that's nicer. */ - return sockaddr_pretty(&sa.sa, salen, true, true, ret); + return sockaddr_pretty(&sa.sa, salen, true, include_port, ret); } int getsockname_pretty(int fd, char **ret) { diff --git a/src/basic/socket-util.h b/src/basic/socket-util.h index 799cde2151..2323ccf3ab 100644 --- a/src/basic/socket-util.h +++ b/src/basic/socket-util.h @@ -105,7 +105,7 @@ bool socket_ipv6_is_supported(void); int sockaddr_port(const struct sockaddr *_sa) _pure_; int sockaddr_pretty(const struct sockaddr *_sa, socklen_t salen, bool translate_ipv6, bool include_port, char **ret); -int getpeername_pretty(int fd, char **ret); +int getpeername_pretty(int fd, bool include_port, char **ret); int getsockname_pretty(int fd, char **ret); int socknameinfo_pretty(union sockaddr_union *sa, socklen_t salen, char **_ret); |