dovecot-2.2: lib-storage: Added mail_storage_copy_error()
dovecot at dovecot.org
dovecot at dovecot.org
Tue Sep 25 17:42:52 EEST 2012
details: http://hg.dovecot.org/dovecot-2.2/rev/3b01d09f7762
changeset: 15098:3b01d09f7762
user: Timo Sirainen <tss at iki.fi>
date: Tue Sep 25 17:42:44 2012 +0300
description:
lib-storage: Added mail_storage_copy_error()
diffstat:
src/lib-storage/mail-storage-private.h | 2 ++
src/lib-storage/mail-storage.c | 10 ++++++++++
2 files changed, 12 insertions(+), 0 deletions(-)
diffs (32 lines):
diff -r d2dd659b4a4a -r 3b01d09f7762 src/lib-storage/mail-storage-private.h
--- a/src/lib-storage/mail-storage-private.h Tue Sep 25 17:41:58 2012 +0300
+++ b/src/lib-storage/mail-storage-private.h Tue Sep 25 17:42:44 2012 +0300
@@ -546,6 +546,8 @@
bool mail_storage_set_error_from_errno(struct mail_storage *storage);
void mail_storage_copy_list_error(struct mail_storage *storage,
struct mailbox_list *list);
+void mail_storage_copy_error(struct mail_storage *dest,
+ struct mail_storage *src);
/* Returns TRUE if everything should already be in memory after this call. */
bool mail_prefetch(struct mail *mail);
diff -r d2dd659b4a4a -r 3b01d09f7762 src/lib-storage/mail-storage.c
--- a/src/lib-storage/mail-storage.c Tue Sep 25 17:41:58 2012 +0300
+++ b/src/lib-storage/mail-storage.c Tue Sep 25 17:42:44 2012 +0300
@@ -483,6 +483,16 @@
mail_storage_set_internal_error(storage);
}
+void mail_storage_copy_error(struct mail_storage *dest,
+ struct mail_storage *src)
+{
+ const char *str;
+ enum mail_error error;
+
+ str = mail_storage_get_last_error(src, &error);
+ mail_storage_set_error(dest, error, str);
+}
+
void mail_storage_copy_list_error(struct mail_storage *storage,
struct mailbox_list *list)
{
More information about the dovecot-cvs
mailing list