dovecot-2.2: dsync: Fail if changing mailbox GUID update doesn't...
dovecot at dovecot.org
dovecot at dovecot.org
Sun Feb 17 11:48:27 EET 2013
details: http://hg.dovecot.org/dovecot-2.2/rev/945ea8abe713
changeset: 15823:945ea8abe713
user: Timo Sirainen <tss at iki.fi>
date: Sun Feb 17 11:47:32 2013 +0200
description:
dsync: Fail if changing mailbox GUID update doesn't work.
diffstat:
src/doveadm/dsync/dsync-brain-mailbox-tree-sync.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diffs (24 lines):
diff -r 7d1479aa534b -r 945ea8abe713 src/doveadm/dsync/dsync-brain-mailbox-tree-sync.c
--- a/src/doveadm/dsync/dsync-brain-mailbox-tree-sync.c Sun Feb 17 11:46:14 2013 +0200
+++ b/src/doveadm/dsync/dsync-brain-mailbox-tree-sync.c Sun Feb 17 11:47:32 2013 +0200
@@ -58,6 +58,20 @@
mailbox_get_last_error(box, NULL));
return -1;
}
+ /* verify that the update worked */
+ if (mailbox_get_metadata(box, MAILBOX_METADATA_GUID,
+ &metadata) < 0) {
+ i_error("Can't get mailbox GUID %s: %s",
+ mailbox_get_vname(box),
+ mailbox_get_last_error(box, NULL));
+ return -1;
+ }
+ if (memcmp(mailbox_guid, metadata.guid,
+ sizeof(metadata.guid)) != 0) {
+ i_error("Backend didn't update mailbox %s GUID",
+ mailbox_get_vname(box));
+ return -1;
+ }
}
return 0;
}
More information about the dovecot-cvs
mailing list