summaryrefslogtreecommitdiff
path: root/src/shared/socket-util.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-05-15 20:15:59 +0200
committerLennart Poettering <lennart@poettering.net>2015-05-15 20:15:59 +0200
commit7693146dee53a2b0f524e977188347166bf454ca (patch)
treeb483b3d9573350fe1fbb92de9193f9542fe7d4f8 /src/shared/socket-util.h
parent35b1078e1c375df244e19961792aeb78ca34bb54 (diff)
socket-util: socket_address_parse() should not log errors on its own
Given that socket_address_parse() is mostly a "library" call it shouldn't log on its own, but leave that to its caller. This patch removes logging from the call in case IPv6 is not available but and IPv6 address shall be parsed. Instead a new call socket_address_parse_and_warn() is introduced which first invokes socket_address_parse() and then logs if necessary. This should fix "make check" on ipv6-less kernels: http://lists.freedesktop.org/archives/systemd-devel/2015-April/031385.html
Diffstat (limited to 'src/shared/socket-util.h')
-rw-r--r--src/shared/socket-util.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/shared/socket-util.h b/src/shared/socket-util.h
index 1f4823009e..538cf59174 100644
--- a/src/shared/socket-util.h
+++ b/src/shared/socket-util.h
@@ -66,6 +66,7 @@ typedef enum SocketAddressBindIPv6Only {
#define socket_address_family(a) ((a)->sockaddr.sa.sa_family)
int socket_address_parse(SocketAddress *a, const char *s);
+int socket_address_parse_and_warn(SocketAddress *a, const char *s);
int socket_address_parse_netlink(SocketAddress *a, const char *s);
int socket_address_print(const SocketAddress *a, char **p);
int socket_address_verify(const SocketAddress *a) _pure_;