1 /* Copyright (c) 2016-2018 Dovecot authors, see the included COPYING file */ 2 3 #include "lib.h" 4 #include "ostream.h" 5 #include "strescape.h" 6 #include "mail-stats.h" 7 #include "client.h" 8 #include "client-reset.h" 9 client_stats_reset(struct client * client,const char * const * args ATTR_UNUSED,const char ** error_r ATTR_UNUSED)10int client_stats_reset(struct client *client, const char *const *args ATTR_UNUSED, 11 const char **error_r ATTR_UNUSED) 12 { 13 struct mail_global *g = &mail_global_stats; 14 stats_reset(g->stats); 15 g->num_logins = 0; 16 g->num_cmds = 0; 17 g->reset_timestamp = ioloop_time; 18 i_zero(&g->last_update); 19 o_stream_nsend_str(client->output, "OK\n"); 20 return 0; 21 } 22