]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
stats: Export also username for commands.
authorTimo Sirainen <tss@iki.fi>
Thu, 15 Sep 2011 20:39:33 +0000 (23:39 +0300)
committerTimo Sirainen <tss@iki.fi>
Thu, 15 Sep 2011 20:39:33 +0000 (23:39 +0300)
src/stats/client-export.c

index f8e554e2a3ed69dc3ee61c4ac38bedf5d607cf0f..c7dcb419bfcc0e84de1eba72a8358ed40a821548 100644 (file)
@@ -256,7 +256,7 @@ static int client_export_iter_command(struct client *client)
 
        if (!cmd->header_sent) {
                o_stream_send_str(client->output,
-                       "cmd\targs\tsession\tlast_update"MAIL_STATS_HEADER);
+                       "cmd\targs\tsession\tuser\tlast_update"MAIL_STATS_HEADER);
                cmd->header_sent = TRUE;
        }
 
@@ -275,6 +275,9 @@ static int client_export_iter_command(struct client *client)
                T_BEGIN {
                        str_append(cmd->str,
                                   guid_128_to_string(command->session->guid));
+                       str_append_c(cmd->str, '\t');
+                       str_tabescape_write(cmd->str,
+                                           command->session->user->name);
                } T_END;
                client_export_timeval(cmd->str, &command->last_update);
                client_export_mail_stats(cmd->str, &command->stats);