dovecot-2.1: stats: UPDATE-CMD for an existing command wasn't ha...

dovecot at dovecot.org dovecot at dovecot.org
Sat Mar 10 15:03:25 EET 2012


details:   http://hg.dovecot.org/dovecot-2.1/rev/30802a608490
changeset: 14281:30802a608490
user:      Timo Sirainen <tss at iki.fi>
date:      Sat Mar 10 15:03:11 2012 +0200
description:
stats: UPDATE-CMD for an existing command wasn't handled properly.
The command's stats themselves weren't updated. Also due to recent change
updating session's stats from a command no longer works properly, because
the session could also be updated in the middle of the command.

diffstat:

 src/stats/mail-command.c |  3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diffs (20 lines):

diff -r 495bda325391 -r 30802a608490 src/stats/mail-command.c
--- a/src/stats/mail-command.c	Sat Mar 10 14:28:48 2012 +0200
+++ b/src/stats/mail-command.c	Sat Mar 10 15:03:11 2012 +0200
@@ -131,7 +131,6 @@
 		cmd = mail_command_add(session, args[3], args[4]);
 		cmd->id = cmd_id;
 		cmd->stats = stats;
-		diff_stats = stats;
 
 		session->num_cmds++;
 		session->user->num_cmds++;
@@ -146,7 +145,7 @@
 			return -1;
 		}
 		cmd->last_update = ioloop_timeval;
-		mail_stats_add(&session->stats, &diff_stats);
+		mail_stats_add(&cmd->stats, &diff_stats);
 	}
 	if (done) {
 		cmd->id = 0;


More information about the dovecot-cvs mailing list