aboutsummaryrefslogtreecommitdiffstats
path: root/journal-notify.c
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2015-06-23 12:22:53 +0200
committerGravatar Christian Hesse <mail@eworm.de>2015-06-23 12:22:53 +0200
commit011989fbb773a1568be6d8609fb821ea8e62fb0f (patch)
tree74015b49d0d7c7d9a65df2c3242f6477aab207fe /journal-notify.c
parent37fbb9fa23885064df9f2fa92c0308184cab4fda (diff)
downloadjournal-notify-011989fbb773a1568be6d8609fb821ea8e62fb0f.tar.gz
journal-notify-011989fbb773a1568be6d8609fb821ea8e62fb0f.tar.zst
introduce config.h
Diffstat (limited to 'journal-notify.c')
-rw-r--r--journal-notify.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/journal-notify.c b/journal-notify.c
index 2d425be..024a7d5 100644
--- a/journal-notify.c
+++ b/journal-notify.c
@@ -303,10 +303,10 @@ int main(int argc, char **argv) {
if (have_regex == 0 || regexec(&regex, message, 0, NULL, 0) == 0) {
/* throttling */
notification_count++;
- if (notification_count >= 6) {
+ if (notification_count >= THROTTLE_THRESHOLD) {
if (verbose)
- fprintf(stderr, "Already showed %u notifications, throttling!\n", notification_count - 1);
- if (executeonly == 0 && notification_count == 6) {
+ fprintf(stderr, "This is the %uth notification, throttling!\n", notification_count);
+ if (executeonly == 0 && notification_count == THROTTLE_THRESHOLD) {
if ((rc = notify(program, "Throttling notification! View your journal for complete log.", 0, "dialog-warning", timeout)) > 0) {
fprintf(stderr, "Failed to show notification.\n");
}