]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
stats: Don't increase session stats based on command stats.
authorTimo Sirainen <tss@iki.fi>
Sun, 4 Sep 2011 07:25:39 +0000 (10:25 +0300)
committerTimo Sirainen <tss@iki.fi>
Sun, 4 Sep 2011 07:25:39 +0000 (10:25 +0300)
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.

src/stats/mail-command.c

index 609deded90e09d38407c9e54f2b254e7cd12a7fc..ce5212104033387ad54474f567edba1ab17fedb9 100644 (file)
@@ -137,7 +137,7 @@ int mail_command_update_parse(const char *const *args, const char **error_r)
        } 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 @@ int mail_command_update_parse(const char *const *args, const char **error_r)
                cmd->id = 0;
                mail_command_unref(&cmd);
        }
-       mail_session_refresh(session, &diff_stats);
+       mail_session_refresh(session, NULL);
        return 0;
 }