Do not ignore updated services when cleaning up removed ones

When cleaning up removed services, the assumption was made that if a
service was not 'removed', it was 'clean'. In reality, it could also
be 'updated', which was then overwritten, causing services not being
restarted. Don't do that.

As a future precaution, make the dirty field const, only allowing
updates from accessor methods.
This commit is contained in:
Tobias Waldekranz committed 2016-01-13 15:14:27 +01:00
1 parent 171d611b14
commit c641a1374e
4 files changed
+19 -8

No files matched your search

+1 -1
View File
@@ -130,7 +130,7 @@ static int service_unblock(svc_t *svc)
static int service_restart(svc_t *svc)
{
svc->dirty = 1;
svc_mark_dirty(svc);
service_step(svc);
return 0;
}