summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/basic/socket-util.c6
-rw-r--r--src/journal-remote/journal-remote.c1
2 files changed, 4 insertions, 3 deletions
diff --git a/src/basic/socket-util.c b/src/basic/socket-util.c
index e8bb10dc9b..62f99b322e 100644
--- a/src/basic/socket-util.c
+++ b/src/basic/socket-util.c
@@ -662,13 +662,13 @@ int socknameinfo_pretty(union sockaddr_union *sa, socklen_t salen, char **_ret)
r = sockaddr_pretty(&sa->sa, salen, true, true, &ret);
if (r < 0)
- return log_error_errno(r, "sockadd_pretty() failed: %m");
+ return r;
log_debug_errno(saved_errno, "getnameinfo(%s) failed: %m", ret);
} else {
ret = strdup(host);
if (!ret)
- return log_oom();
+ return -ENOMEM;
}
*_ret = ret;
@@ -683,7 +683,7 @@ int getnameinfo_pretty(int fd, char **ret) {
assert(ret);
if (getsockname(fd, &sa.sa, &salen) < 0)
- return log_error_errno(errno, "getsockname(%d) failed: %m", fd);
+ return -errno;
return socknameinfo_pretty(&sa, salen, ret);
}
diff --git a/src/journal-remote/journal-remote.c b/src/journal-remote/journal-remote.c
index 1baedf6367..e3bd76051b 100644
--- a/src/journal-remote/journal-remote.c
+++ b/src/journal-remote/journal-remote.c
@@ -1114,6 +1114,7 @@ static int accept_connection(const char* type, int fd,
r = socknameinfo_pretty(&addr->sockaddr, addr->size, &b);
if (r < 0) {
+ log_error_errno(r, "Resolving hostname failed: %m");
close(fd2);
return r;
}