core/manager: Make sure jobs statistics are not double after daemon-reload
authorMichal Koutný <mkoutny@suse.com>
Fri, 22 Jun 2018 14:19:52 +0000 (16:19 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 25 Jun 2018 09:18:44 +0000 (11:18 +0200)
commit1e75824cb005f7fa0089792e45c2747c4d059601
tree21daff98d64a6647eb9beb35e0e6d1a0def295fe
parent1a0d353b44e56d65e1e4c985eb46f8548c25e73e
core/manager: Make sure jobs statistics are not double after daemon-reload

We add n_installed_jobs and n_failed_jobs to our inner state after
deserialization. This is fine during daemon-reexec when we start with clear
Manager (and some jobs possibly queued before deserialization), however,
daemon-reload works with the same manager and adding the values would
effectively double the counters. Reset the counters before we deserialize and
add their values again.
src/core/manager.c