From 451b34cc1d74960ee0262eef970a6346ec814f31 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 4 Jul 2012 00:23:42 +0200 Subject: service: flush the start counter in "systemctl reset-failed" --- src/shared/ratelimit.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/shared/ratelimit.h') diff --git a/src/shared/ratelimit.h b/src/shared/ratelimit.h index 07e8205c81..ad00267a6e 100644 --- a/src/shared/ratelimit.h +++ b/src/shared/ratelimit.h @@ -48,6 +48,13 @@ typedef struct RateLimit { _r->begin = 0; \ } while (false) +#define RATELIMIT_RESET(v) \ + do { \ + RateLimit *_r = &(v); \ + _r->num = 0; \ + _r->begin = 0; \ + } while (false) + bool ratelimit_test(RateLimit *r); #endif -- cgit v1.2.3-54-g00ecf