Mercurial > dovecot > original-hg > dovecot-1.2
diff src/pop3/commands.c @ 3384:3b75956d20c4 HEAD
Added configurable logging for login process. Added configurable pop3 logout
string. Based on a patch by Andrey Panin.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sat, 14 May 2005 23:32:03 +0300 |
parents | 2d8874b023ea |
children | bfb2658a2616 |
line wrap: on
line diff
--- a/src/pop3/commands.c Sat May 14 20:17:29 2005 +0300 +++ b/src/pop3/commands.c Sat May 14 23:32:03 2005 +0300 @@ -217,7 +217,7 @@ if (client->deleted) { if (!expunge_mails(client)) { client_send_storage_error(client); - client_disconnect(client); + client_disconnect(client, "Storage error during logout."); return TRUE; } } @@ -230,7 +230,7 @@ else client_send_line(client, "+OK Logging out, messages deleted."); - client_disconnect(client); + client_disconnect(client, "Logout."); return TRUE; } @@ -342,6 +342,10 @@ (void)o_stream_send(client->output, "\r\n", 2); } + *client->byte_counter += + client->output->offset - client->byte_counter_offset; + client->byte_counter = NULL; + client_send_line(client, "."); fetch_deinit(ctx); client->cmd = NULL; @@ -405,6 +409,10 @@ if (client->last_seen <= msgnum) client->last_seen = msgnum+1; + client->retr_count++; + client->byte_counter = &client->retr_bytes; + client->byte_counter_offset = client->output->offset; + fetch(client, msgnum, (uoff_t)-1); return TRUE; } @@ -468,6 +476,10 @@ if (get_size(client, args, &max_lines) == NULL) return FALSE; + client->top_count++; + client->byte_counter = &client->top_bytes; + client->byte_counter_offset = client->output->offset; + fetch(client, msgnum, max_lines); return TRUE; }