changeset 13373:9434093229aa

stats: Don't increase session stats based on command stats. This was buggy because the session stats were now increased twice. It could have been possible to keep doing this and on UPDATE-SESSION simply replace the old session stats, but that might still have caused the session stats to temporarily go too high and then drop down.
author Timo Sirainen <tss@iki.fi>
date Sun, 04 Sep 2011 10:25:39 +0300
parents 66453d942761
children 54318eaada67
files src/stats/mail-command.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/stats/mail-command.c	Sun Sep 04 10:15:16 2011 +0300
+++ b/src/stats/mail-command.c	Sun Sep 04 10:25:39 2011 +0300
@@ -137,7 +137,7 @@
 	} else {
 		if (!mail_stats_diff(&cmd->stats, &stats, &diff_stats,
 				     &error)) {
-			*error_r = t_strconcat("UPDATE-SESSION: stats shrank: ",
+			*error_r = t_strconcat("UPDATE-CMD: stats shrank: ",
 					       error, NULL);
 			return -1;
 		}
@@ -148,7 +148,7 @@
 		cmd->id = 0;
 		mail_command_unref(&cmd);
 	}
-	mail_session_refresh(session, &diff_stats);
+	mail_session_refresh(session, NULL);
 	return 0;
 }