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

+2 -2
View File
@@ -844,7 +844,7 @@ restart:
break;
}
svc->dirty = 0;
svc_mark_clean(svc);
switch (svc->type) {
case SVC_TYPE_SERVICE:
@@ -898,7 +898,7 @@ restart:
service_stop(svc);
*state = SVC_STOPPING_STATE;
}
svc->dirty = 0;
svc_mark_clean(svc);
}
break;