summaryrefslogtreecommitdiff
path: root/src/core/socket.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-11-11 23:14:12 +0100
committerTom Gundersen <teg@jklm.no>2015-11-11 23:14:12 +0100
commitfb5c8184a99ed3379d6a48eed2b83f6f7ee9ee18 (patch)
treef8144b0ba312e12a221ec9b1c0f7f937fb5aec9d /src/core/socket.c
parenta9ae08421eac6080d68c03c503c1673eea9f37b3 (diff)
parentee735086f8670be1591fa9593e80dd60163a7a2f (diff)
Merge pull request #1854 from poettering/unit-deps
Dependency engine improvements
Diffstat (limited to 'src/core/socket.c')
-rw-r--r--src/core/socket.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/core/socket.c b/src/core/socket.c
index c73ee78b13..43d4ec5dca 100644
--- a/src/core/socket.c
+++ b/src/core/socket.c
@@ -296,6 +296,9 @@ static int socket_add_default_dependencies(Socket *s) {
int r;
assert(s);
+ if (!UNIT(s)->default_dependencies)
+ return 0;
+
r = unit_add_dependency_by_name(UNIT(s), UNIT_BEFORE, SPECIAL_SOCKETS_TARGET, NULL, true);
if (r < 0)
return r;
@@ -365,11 +368,9 @@ static int socket_add_extras(Socket *s) {
return r;
}
- if (u->default_dependencies) {
- r = socket_add_default_dependencies(s);
- if (r < 0)
- return r;
- }
+ r = socket_add_default_dependencies(s);
+ if (r < 0)
+ return r;
return 0;
}