Skip to content

Commit

Permalink
stats: Fixed ADD-USER stats tracking (auth stats)
Browse files Browse the repository at this point in the history
  • Loading branch information
sirainen committed May 5, 2016
1 parent a9be54b commit b118764
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/stats/mail-user.c
Expand Up @@ -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;

Expand All @@ -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;
Expand Down

0 comments on commit b118764

Please sign in to comment.