diff options
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 240fb60212..c4d6d0b9f5 100644 --- a/src/basic/socket-util.c +++ b/src/basic/socket-util.c @@ -608,7 +608,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; @@ -638,7 +638,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 f9c90e0e73..eb3febf669 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); |