From 7693146dee53a2b0f524e977188347166bf454ca Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 15 May 2015 20:15:59 +0200 Subject: 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 --- src/core/load-fragment.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core') diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c index 3865017d97..5fa476c9f0 100644 --- a/src/core/load-fragment.c +++ b/src/core/load-fragment.c @@ -356,7 +356,7 @@ int config_parse_socket_listen(const char *unit, log_syntax(unit, LOG_ERR, filename, line, -r, "Failed to resolve unit specifiers on %s, ignoring: %s", rvalue, strerror(-r)); - r = socket_address_parse(&p->address, k ? k : rvalue); + r = socket_address_parse_and_warn(&p->address, k ? k : rvalue); if (r < 0) { log_syntax(unit, LOG_ERR, filename, line, -r, "Failed to parse address value, ignoring: %s", rvalue); -- cgit v1.2.3-54-g00ecf