summaryrefslogtreecommitdiffstats
path: root/src/core/unit.c
diff options
context:
space:
mode:
authorypf791 <ypf791@gmail.com>2019-07-19 12:28:04 +0200
committerFrantisek Sumsal <frantisek@sumsal.cz>2019-09-17 15:46:21 +0200
commitb49e14d5f3081dfcd363d8199a14c0924ae9152f (patch)
treefa97bd8861c4094ab08082846bcb9b05dbf31538 /src/core/unit.c
parentMerge pull request #13567 from keszybz/logind-two-refactoring-patches (diff)
downloadsystemd-b49e14d5f3081dfcd363d8199a14c0924ae9152f.tar.xz
systemd-b49e14d5f3081dfcd363d8199a14c0924ae9152f.zip
core: coldplug possible nop_job
Diffstat (limited to 'src/core/unit.c')
-rw-r--r--src/core/unit.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/unit.c b/src/core/unit.c
index 52a1acafab..87a5976dcc 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -3901,6 +3901,7 @@ int unit_add_node_dependency(Unit *u, const char *what, bool wants, UnitDependen
int unit_coldplug(Unit *u) {
int r = 0, q;
char **i;
+ Job *uj;
assert(u);
@@ -3923,8 +3924,9 @@ int unit_coldplug(Unit *u) {
r = q;
}
- if (u->job) {
- q = job_coldplug(u->job);
+ uj = u->job ?: u->nop_job;
+ if (uj) {
+ q = job_coldplug(uj);
if (q < 0 && r >= 0)
r = q;
}