/* Copyright (c) 2016-2018 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "ioloop.h"
#include "time-util.h"
#include "log-throttle.h"
struct log_throttle {
void *context;
unsigned int last_count;
};
struct log_throttle *
{
return throttle;
}
{
}
{
if (throttle->last_count > 0)
throttle->last_count = 0;
}
{
/* unthrottling and last_count resets are done only by
the callback */
throttle->last_count++;
return FALSE;
return TRUE;
return TRUE;
} else {
return FALSE;
}
}