dovecot-2.1: imap-stats: Don't send IDLE command updates to stat...

dovecot at dovecot.org dovecot at dovecot.org
Mon Nov 14 23:26:31 EET 2011


details:   http://hg.dovecot.org/dovecot-2.1/rev/a538eec53922
changeset: 13693:a538eec53922
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Nov 14 23:15:37 2011 +0200
description:
imap-stats: Don't send IDLE command updates to stats service.

diffstat:

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

diffs (16 lines):

diff -r 1cda9fe6d7fa -r a538eec53922 src/plugins/imap-stats/imap-stats-plugin.c
--- a/src/plugins/imap-stats/imap-stats-plugin.c	Mon Nov 14 23:15:17 2011 +0200
+++ b/src/plugins/imap-stats/imap-stats-plugin.c	Mon Nov 14 23:15:37 2011 +0200
@@ -33,6 +33,12 @@
 	if (suser == NULL || !suser->track_commands)
 		return;
 
+	if (strcasecmp(cmd->name, "IDLE") == 0) {
+		/* IDLE can run forever and waste stats process's memory while
+		   waiting for it to timeout. don't send them. */
+		return;
+	}
+
 	scmd = IMAP_STATS_IMAP_CONTEXT(cmd);
 	if (scmd == NULL) {
 		scmd = p_new(cmd->pool, struct stats_client_command, 1);


More information about the dovecot-cvs mailing list