[dovecot-cvs] dovecot/src/imap cmd-check.c, 1.5, 1.6 cmd-logout.c,
1.5, 1.6 cmd-select.c, 1.32, 1.33 imap-expunge.c, 1.4, 1.5
cras at dovecot.org
cras at dovecot.org
Fri Sep 24 14:47:32 EEST 2004
Update of /var/lib/cvs/dovecot/src/imap
In directory talvi:/tmp/cvs-serv19961/imap
Modified Files:
cmd-check.c cmd-logout.c cmd-select.c imap-expunge.c
Log Message:
Split sync_flag_full into sync_flag_full_read and _write. Closing mailbox
now always writes changes.
Index: cmd-check.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/cmd-check.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- cmd-check.c 28 Aug 2004 16:39:53 -0000 1.5
+++ cmd-check.c 24 Sep 2004 11:47:30 -0000 1.6
@@ -8,5 +8,6 @@
if (!client_verify_open_mailbox(client))
return TRUE;
- return cmd_sync(client, MAILBOX_SYNC_FLAG_FULL, "OK Check completed.");
+ return cmd_sync(client, MAILBOX_SYNC_FLAG_FULL_READ |
+ MAILBOX_SYNC_FLAG_FULL_WRITE, "OK Check completed.");
}
Index: cmd-logout.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/cmd-logout.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- cmd-logout.c 23 Sep 2004 22:27:16 -0000 1.5
+++ cmd-logout.c 24 Sep 2004 11:47:30 -0000 1.6
@@ -11,14 +11,6 @@
/* this could be done at client_disconnect() as well,
but eg. mbox rewrite takes a while so the waiting is
better to happen before "OK" message. */
- if (imap_sync_nonselected(client->mailbox,
- MAILBOX_SYNC_FLAG_FULL) < 0) {
- client_send_storage_error(client,
- mailbox_get_storage(client->mailbox));
- mailbox_close(client->mailbox);
- return TRUE;
- }
-
mailbox_close(client->mailbox);
client->mailbox = NULL;
}
Index: cmd-select.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/cmd-select.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- cmd-select.c 23 Sep 2004 22:27:16 -0000 1.32
+++ cmd-select.c 24 Sep 2004 11:47:30 -0000 1.33
@@ -35,7 +35,7 @@
return TRUE;
}
- if (imap_sync_nonselected(box, 0) < 0) {
+ if (imap_sync_nonselected(box, MAILBOX_SYNC_FLAG_FULL_READ) < 0) {
client_send_storage_error(client, storage);
mailbox_close(box);
return TRUE;
Index: imap-expunge.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/imap-expunge.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- imap-expunge.c 29 Aug 2004 07:52:02 -0000 1.4
+++ imap-expunge.c 24 Sep 2004 11:47:30 -0000 1.5
@@ -10,7 +10,8 @@
struct mail_search_context *ctx;
struct mailbox_transaction_context *t;
struct mail *mail;
- struct mail_search_arg search_arg;
+ struct mail_search_arg search_arg;
+ enum mailbox_sync_flags flags;
int failed = FALSE;
memset(&search_arg, 0, sizeof(search_arg));
@@ -36,7 +37,9 @@
if (failed)
mailbox_transaction_rollback(t);
else {
- if (mailbox_transaction_commit(t, MAILBOX_SYNC_FLAG_FULL) < 0)
+ flags = MAILBOX_SYNC_FLAG_FULL_READ |
+ MAILBOX_SYNC_FLAG_FULL_WRITE;
+ if (mailbox_transaction_commit(t, flags) < 0)
failed = TRUE;
}
More information about the dovecot-cvs
mailing list