dovecot-1.2: pop3: Fix to previous changes: Update \Seen flags e...
dovecot at dovecot.org
dovecot at dovecot.org
Thu Feb 5 18:54:59 EET 2009
details: http://hg.dovecot.org/dovecot-1.2/rev/eaffedbc23f2
changeset: 8723:eaffedbc23f2
user: Timo Sirainen <tss at iki.fi>
date: Thu Feb 05 11:54:53 2009 -0500
description:
pop3: Fix to previous changes: Update \Seen flags even when not using QUIT.
diffstat:
3 files changed, 7 insertions(+), 2 deletions(-)
src/pop3/client.c | 3 +++
src/pop3/client.h | 1 +
src/pop3/commands.c | 5 +++--
diffs (52 lines):
diff -r fbc3e829ade6 -r eaffedbc23f2 src/pop3/client.c
--- a/src/pop3/client.c Wed Feb 04 17:50:05 2009 -0500
+++ b/src/pop3/client.c Thu Feb 05 11:54:53 2009 -0500
@@ -272,6 +272,9 @@ static const char *client_get_disconnect
void client_destroy(struct client *client, const char *reason)
{
+ if (client->seen_change_count > 0)
+ client_update_mails(client);
+
if (!client->disconnected) {
if (reason == NULL)
reason = client_get_disconnect_reason(client);
diff -r fbc3e829ade6 -r eaffedbc23f2 src/pop3/client.h
--- a/src/pop3/client.h Wed Feb 04 17:50:05 2009 -0500
+++ b/src/pop3/client.h Thu Feb 05 11:54:53 2009 -0500
@@ -66,6 +66,7 @@ void client_send_storage_error(struct cl
void client_send_storage_error(struct client *client);
bool client_handle_input(struct client *client);
+bool client_update_mails(struct client *client);
void clients_init(void);
void clients_deinit(void);
diff -r fbc3e829ade6 -r eaffedbc23f2 src/pop3/commands.c
--- a/src/pop3/commands.c Wed Feb 04 17:50:05 2009 -0500
+++ b/src/pop3/commands.c Thu Feb 05 11:54:53 2009 -0500
@@ -195,7 +195,7 @@ pop3_search_build(struct client *client,
return search_args;
}
-static bool update_mails(struct client *client)
+bool client_update_mails(struct client *client)
{
struct mail_search_args *search_args;
struct mail_search_context *ctx;
@@ -226,13 +226,14 @@ static bool update_mails(struct client *
}
mail_free(&mail);
+ client->seen_change_count = 0;
return mailbox_search_deinit(&ctx) == 0;
}
static int cmd_quit(struct client *client, const char *args ATTR_UNUSED)
{
if (client->deleted || client->seen_bitmask != NULL) {
- if (!update_mails(client)) {
+ if (!client_update_mails(client)) {
client_send_storage_error(client);
client_disconnect(client,
"Storage error during logout.");
More information about the dovecot-cvs
mailing list