summaryrefslogtreecommitdiff
path: root/src/core/socket.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-03-31 22:44:45 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-04-01 00:37:48 -0400
commitd7607eac6318ae8ff1c00ef5705fd55a614cd495 (patch)
treea037e90882c1b8811d90c7b9da2a7c6719067a67 /src/core/socket.c
parentaa7c3195f220968907c616e0278e3bebe6eaafbd (diff)
core/socket: log errors when starting socket for this socket
When showing an error like 'Socket service not loaded', the error won't show up in the status for the socket, unless it is marked as SYSTEMD_UNIT=*.socket. Marking it as SYSTEMD_UNIT=*.service, when the service is non-existent, is not useful.
Diffstat (limited to 'src/core/socket.c')
-rw-r--r--src/core/socket.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/socket.c b/src/core/socket.c
index 31f4bf49b6..d6d531d377 100644
--- a/src/core/socket.c
+++ b/src/core/socket.c
@@ -1634,7 +1634,7 @@ static int socket_start(Unit *u) {
service = SERVICE(UNIT_DEREF(s->service));
if (UNIT(service)->load_state != UNIT_LOADED) {
- log_error_unit(UNIT(service)->id,
+ log_error_unit(u->id,
"Socket service %s not loaded, refusing.",
UNIT(service)->id);
return -ENOENT;
@@ -1645,7 +1645,7 @@ static int socket_start(Unit *u) {
if (service->state != SERVICE_DEAD &&
service->state != SERVICE_FAILED &&
service->state != SERVICE_AUTO_RESTART) {
- log_error_unit(UNIT(service)->id,
+ log_error_unit(u->id,
"Socket service %s already active, refusing.",
UNIT(service)->id);
return -EBUSY;
@@ -1653,7 +1653,7 @@ static int socket_start(Unit *u) {
#ifdef HAVE_SYSV_COMPAT
if (service->is_sysv) {
- log_error_unit(UNIT(s)->id,
+ log_error_unit(u->id,
"Using SysV services for socket activation is not supported. Refusing.");
return -ENOENT;
}