summaryrefslogtreecommitdiff
path: root/src/basic/ratelimit.h
Commit message (Collapse)AuthorAgeFilesLines
* Uphold/StopWhenUnneeded/BindsTo: add retry timer on rate limitLuca Boccassi2023-04-121-0/+2
| | | | | | | | | The Upholds= promise is that as long as unit A is up and Upholds=B, B will be activated if failed or inactive. But there is a hard-coded, non-configurable rate limit for this, so add a timed retry after the ratelimit has expired. Apply to BindsTo= and StopWhenUnneeded= as well.
* journald: use rate-limited logging to log 'Failed to write entry' messageRichard Phibel2022-08-241-1/+2
|
* license: LGPL-2.1+ -> LGPL-2.1-or-laterYu Watanabe2020-11-091-1/+1
|
* ratelimit: add ratelimit_configured() helperLennart Poettering2020-10-091-0/+4
| | | | | | This helper alone doesn't make too much sense, but it's preparatory work for #17274, and I guess it can't hurt to land it early, it does make the ratelimit code a tiny bit prettier after all.
* Drop RATELIMIT macrosZbigniew Jędrzejewski-Szmek2019-09-201-26/+6
| | | | | Using plain structure initialization is both shorter _and_ more clearer. We get type safety for free.
* tree-wide: remove Lennart's copyright linesLennart Poettering2018-06-141-4/+0
| | | | | | | | | | | These lines are generally out-of-date, incomplete and unnecessary. With SPDX and git repository much more accurate and fine grained information about licensing and authorship is available, hence let's drop the per-file copyright notice. Of course, removing copyright lines of others is problematic, hence this commit only removes my own lines and leaves all others untouched. It might be nicer if sooner or later those could go away too, making git the only and accurate source of authorship information.
* tree-wide: drop 'This file is part of systemd' blurbLennart Poettering2018-06-141-2/+0
| | | | | | | | | | | | | | | | This part of the copyright blurb stems from the GPL use recommendations: https://www.gnu.org/licenses/gpl-howto.en.html The concept appears to originate in times where version control was per file, instead of per tree, and was a way to glue the files together. Ultimately, we nowadays don't live in that world anymore, and this information is entirely useless anyway, as people are very welcome to copy these files into any projects they like, and they shouldn't have to change bits that are part of our copyright header for that. hence, let's just get rid of this old cruft, and shorten our codebase a bit.
* Rename ratelimit_test to ratelimit_belowZbigniew Jędrzejewski-Szmek2018-05-131-1/+1
| | | | | | | | | | | | When I see "test", I have to think three times what the return value means. With "below" this is immediately clear. ratelimit_below(&limit) sounds almost like English and is imho immediately obvious. (I also considered ratelimit_ok, but this strongly implies that being under the limit is somehow better. Most of the times this is true, but then we use the ratelimit to detect triple-c-a-d, and "ok" doesn't fit so well there.) C.f. a1bcaa07.
* tree-wide: drop license boilerplateZbigniew Jędrzejewski-Szmek2018-04-061-13/+0
| | | | | | | | | | Files which are installed as-is (any .service and other unit files, .conf files, .policy files, etc), are left as is. My assumption is that SPDX identifiers are not yet that well known, so it's better to retain the extended header to avoid any doubt. I also kept any copyright lines. We can probably remove them, but it'd nice to obtain explicit acks from all involved authors before doing that.
* Add SPDX license identifiers to source files under the LGPLZbigniew Jędrzejewski-Szmek2017-11-191-0/+1
| | | | | This follows what the kernel is doing, c.f. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5fd54ace4721fc5ce2bb5aef6318fcf17f421460.
* tree-wide: remove Emacs lines from all filesDaniel Mack2016-02-101-2/+0
| | | | | This should be handled fine now by .dir-locals.el, so need to carry that stuff in every file.
* basic: include only what we useThomas Hindoe Paaboel Andersen2015-11-301-0/+3
| | | | | This is a cleaned up result of running iwyu but without forward declarations on src/basic.
* build-sys: split internal basic/ library from shared/Kay Sievers2015-06-111-0/+57
basic/ can be used by everything cannot use anything outside of basic/ libsystemd/ can use basic/ cannot use shared/ shared/ can use libsystemd/