dovecot-2.0: lib-storage: Don't clear errors unnecessarily (and ...

dovecot at dovecot.org dovecot at dovecot.org
Thu Dec 17 04:23:49 EET 2009


details:   http://hg.dovecot.org/dovecot-2.0/rev/1cb0e7cf3750
changeset: 10511:1cb0e7cf3750
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Dec 16 21:23:44 2009 -0500
description:
lib-storage: Don't clear errors unnecessarily (and inconsistently).

diffstat:

2 files changed, 15 deletions(-)
src/lib-storage/mail-storage.c |    8 --------
src/lib-storage/mailbox-list.c |    7 -------

diffs (77 lines):

diff -r 6ee8264b0284 -r 1cb0e7cf3750 src/lib-storage/mail-storage.c
--- a/src/lib-storage/mail-storage.c	Wed Dec 16 21:22:39 2009 -0500
+++ b/src/lib-storage/mail-storage.c	Wed Dec 16 21:23:44 2009 -0500
@@ -393,8 +393,6 @@ void mail_storage_set_callbacks(struct m
 
 int mail_storage_purge(struct mail_storage *storage)
 {
-	mail_storage_clear_error(storage);
-
 	return storage->v.purge == NULL ? 0 :
 		storage->v.purge(storage);
 }
@@ -473,8 +471,6 @@ int mailbox_open(struct mailbox *box)
 {
 	int ret;
 
-	mail_storage_clear_error(box->storage);
-
 	if (!mailbox_list_is_valid_existing_name(box->list, box->name)) {
 		mail_storage_set_error(box->storage, MAIL_ERROR_PARAMS,
 				       "Invalid mailbox name");
@@ -518,8 +514,6 @@ int mailbox_create(struct mailbox *box, 
 int mailbox_create(struct mailbox *box, const struct mailbox_update *update,
 		   bool directory)
 {
-	mail_storage_clear_error(box->storage);
-
 	if (!mailbox_list_is_valid_create_name(box->list, box->name)) {
 		mail_storage_set_error(box->storage, MAIL_ERROR_PARAMS,
 				       "Invalid mailbox name");
@@ -531,8 +525,6 @@ int mailbox_create(struct mailbox *box, 
 
 int mailbox_update(struct mailbox *box, const struct mailbox_update *update)
 {
-	mail_storage_clear_error(box->storage);
-
 	return box->v.update(box, update);
 }
 
diff -r 6ee8264b0284 -r 1cb0e7cf3750 src/lib-storage/mailbox-list.c
--- a/src/lib-storage/mailbox-list.c	Wed Dec 16 21:22:39 2009 -0500
+++ b/src/lib-storage/mailbox-list.c	Wed Dec 16 21:23:44 2009 -0500
@@ -493,8 +493,6 @@ const char *mailbox_list_get_path(struct
 const char *mailbox_list_get_path(struct mailbox_list *list, const char *name,
 				  enum mailbox_list_path_type type)
 {
-	mailbox_list_clear_error(list);
-
 	return list->v.get_path(list, name, type);
 }
 
@@ -526,8 +524,6 @@ int mailbox_list_get_mailbox_name_status
 					 const char *name,
 					 enum mailbox_name_status *status)
 {
-	mailbox_list_clear_error(list);
-
 	if (!mailbox_list_is_valid_existing_name(list, name)) {
 		*status = MAILBOX_NAME_INVALID;
 		return 0;
@@ -553,7 +549,6 @@ mailbox_list_iter_init_multiple(struct m
 {
 	i_assert(*patterns != NULL);
 
-	mailbox_list_clear_error(list);
 	return list->v.iter_init(list, patterns, flags);
 }
 
@@ -719,8 +714,6 @@ int mailbox_list_set_subscribed(struct m
 {
 	uint8_t guid[MAIL_GUID_128_SIZE];
 	unsigned char sha[SHA1_RESULTLEN];
-
-	mailbox_list_clear_error(list);
 
 	if (list->v.set_subscribed(list, name, set) < 0)
 		return -1;


More information about the dovecot-cvs mailing list