dovecot-2.2: stats: Don't allow stats_refresh setting to be set ...

dovecot at dovecot.org dovecot at dovecot.org
Mon Mar 16 11:55:42 UTC 2015


details:   http://hg.dovecot.org/dovecot-2.2/rev/3d8a054a93a9
changeset: 18353:3d8a054a93a9
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Mar 16 13:54:50 2015 +0200
description:
stats: Don't allow stats_refresh setting to be set too large.

diffstat:

 src/plugins/stats/stats-plugin.c |  5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diffs (15 lines):

diff -r d88af513a942 -r 3d8a054a93a9 src/plugins/stats/stats-plugin.c
--- a/src/plugins/stats/stats-plugin.c	Mon Mar 16 13:53:54 2015 +0200
+++ b/src/plugins/stats/stats-plugin.c	Mon Mar 16 13:54:50 2015 +0200
@@ -375,6 +375,11 @@
 	}
 	if (refresh_secs == 0)
 		return;
+	if (refresh_secs > SESSION_STATS_FORCE_REFRESH_SECS) {
+		i_warning("stats: stats_refresh too large, changing to %u",
+			  SESSION_STATS_FORCE_REFRESH_SECS);
+		refresh_secs = SESSION_STATS_FORCE_REFRESH_SECS;
+	}
 
 	if (global_stats_conn == NULL) {
 		path = t_strconcat(user->set->base_dir,


More information about the dovecot-cvs mailing list