summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-01-07 01:21:40 +0100
committerLennart Poettering <lennart@poettering.net>2012-01-07 01:26:08 +0100
commit4ff77f66af8bd3e7e403c81febb7a2471457c5da (patch)
tree75d58283704c8c4e7b0214b6421a3c35e0fe202f
parentmain: fix spelling (diff)
downloadsystemd-4ff77f66af8bd3e7e403c81febb7a2471457c5da.tar.gz
systemd-4ff77f66af8bd3e7e403c81febb7a2471457c5da.tar.bz2
systemd-4ff77f66af8bd3e7e403c81febb7a2471457c5da.zip
load-fragment: fix parsing of Socket= setting
-rw-r--r--src/load-fragment.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/load-fragment.c b/src/load-fragment.c
index 19031904f..ef5d192f2 100644
--- a/src/load-fragment.c
+++ b/src/load-fragment.c
@@ -1386,6 +1386,7 @@ int config_parse_socket_service(
Socket *s = data;
int r;
DBusError error;
+ Unit *x;
assert(filename);
assert(lvalue);
@@ -1399,12 +1400,15 @@ int config_parse_socket_service(
return 0;
}
- if ((r = manager_load_unit(s->meta.manager, rvalue, NULL, &error, (Unit**) &s->service)) < 0) {
+ r = manager_load_unit(s->meta.manager, rvalue, NULL, &error, &x);
+ if (r < 0) {
log_error("[%s:%u] Failed to load unit %s, ignoring: %s", filename, line, rvalue, bus_error(&error, r));
dbus_error_free(&error);
return 0;
}
+ unit_ref_set(&s->service, x);
+
return 0;
}