core: also enforce ratelimiter if we stop a unit due to BindsTo=

This extends on bea355dac9, and extends
the ratelimiter to not only be used for StopWhenUnneeded=1 units but
also for units that have BindsTo= on a unit that is dead.

http://lists.freedesktop.org/archives/systemd-devel/2015-April/030224.html
This commit is contained in:
Lennart Poettering
2015-05-19 16:23:14 +02:00
parent f8a30ce524
commit 67bfdc9771
2 changed files with 16 additions and 5 deletions
+2 -2
View File
@@ -175,8 +175,8 @@ struct Unit {
/* Error code when we didn't manage to load the unit (negative) */
int load_error;
/* Make sure we never enter endless loops with the check unneeded logic */
RateLimit check_unneeded_ratelimit;
/* Make sure we never enter endless loops with the check unneeded logic, or the BindsTo= logic */
RateLimit auto_stop_ratelimit;
/* Cached unit file state and preset */
UnitFileState unit_file_state;