From: Timo Sirainen Date: Thu, 5 May 2016 11:58:46 +0000 (+0300) Subject: stats: Fixed ADD-USER stats tracking (auth stats) X-Git-Tag: 2.3.0.rc1~3837 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b11876430fa29dbcd0e2fd41e329e472e66fbe7e;p=thirdparty%2Fdovecot%2Fcore.git stats: Fixed ADD-USER stats tracking (auth stats) --- diff --git a/src/stats/mail-user.c b/src/stats/mail-user.c index 3358483fa7..6e0f7b87c6 100644 --- a/src/stats/mail-user.c +++ b/src/stats/mail-user.c @@ -122,7 +122,7 @@ void mail_user_refresh(struct mail_user *user, int mail_user_add_parse(const char *const *args, const char **error_r) { struct mail_user *user; - struct stats *diff_stats; + struct stats *empty_stats, *diff_stats; buffer_t *buf; const char *service, *error; @@ -141,8 +141,9 @@ int mail_user_add_parse(const char *const *args, const char **error_r) user->name, service); return -1; } + empty_stats = stats_alloc(pool_datastack_create()); diff_stats = stats_alloc(pool_datastack_create()); - if (!stats_import(buf->data, buf->used, user->stats, diff_stats, &error)) { + if (!stats_import(buf->data, buf->used, empty_stats, diff_stats, &error)) { *error_r = t_strdup_printf("ADD-USER %s %s: %s", user->name, service, error); return -1;