diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 09:51:24 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 09:51:24 +0000 |
commit | f7548d6d28c313cf80e6f3ef89aed16a19815df1 (patch) | |
tree | a3f6f2a3f247293bee59ecd28e8cd8ceb6ca064a /src/old-stats/client-reset.c | |
parent | Initial commit. (diff) | |
download | dovecot-upstream.tar.xz dovecot-upstream.zip |
Adding upstream version 1:2.3.19.1+dfsg1.upstream/1%2.3.19.1+dfsg1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/old-stats/client-reset.c')
-rw-r--r-- | src/old-stats/client-reset.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/old-stats/client-reset.c b/src/old-stats/client-reset.c new file mode 100644 index 0000000..965bb22 --- /dev/null +++ b/src/old-stats/client-reset.c @@ -0,0 +1,21 @@ +/* Copyright (c) 2016-2018 Dovecot authors, see the included COPYING file */ + +#include "lib.h" +#include "ostream.h" +#include "strescape.h" +#include "mail-stats.h" +#include "client.h" +#include "client-reset.h" + +int client_stats_reset(struct client *client, const char *const *args ATTR_UNUSED, + const char **error_r ATTR_UNUSED) +{ + struct mail_global *g = &mail_global_stats; + stats_reset(g->stats); + g->num_logins = 0; + g->num_cmds = 0; + g->reset_timestamp = ioloop_time; + i_zero(&g->last_update); + o_stream_nsend_str(client->output, "OK\n"); + return 0; +} |