service: fix for RestartMode=direct option
authorRichard Phibel <rphibel@googlemail.com>
Thu, 6 Jul 2023 12:03:35 +0000 (14:03 +0200)
committerRichard Phibel <rphibel@googlemail.com>
Thu, 6 Jul 2023 12:35:33 +0000 (14:35 +0200)
commit2a39b91459a4c27985d9a58309c0fda25f3cd397
treed27f249e95328b76e6a91210610eb7476f6d2bea
parente568fea9fcd2189d4366df254a8a4031dc433762
service: fix for RestartMode=direct option

With the fix done in PR28215, the unit restart job is created with type JOB_START.
Because of that, it is not properly merged anymore with the old one: the
merged job has state JOB_RUNNING. It should have state JOB_WAITING.

I think that the old job is not cleaned up because we don't go through the failed state.

With this fix, the merged job is properly created with state JOB_WAITING.
src/core/job.c
src/core/job.h
src/core/transaction.c