[dovecot-cvs] dovecot/src/lib-storage mail-storage-private.h, 1.49, 1.50 mail-storage.c, 1.77, 1.78

tss at dovecot.org tss at dovecot.org
Fri Mar 30 21:57:36 EEST 2007


Update of /var/lib/cvs/dovecot/src/lib-storage
In directory talvi:/tmp/cvs-serv30520

Modified Files:
	mail-storage-private.h mail-storage.c 
Log Message:
Removed virtual mail_storage.get_last_error(). The implementation is always
the same.



Index: mail-storage-private.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/mail-storage-private.h,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -d -r1.49 -r1.50
--- mail-storage-private.h	30 Mar 2007 18:41:05 -0000	1.49
+++ mail-storage-private.h	30 Mar 2007 18:57:34 -0000	1.50
@@ -36,10 +36,6 @@
 
 	int (*mailbox_create)(struct mail_storage *storage, const char *name,
 			      bool directory);
-
-	const char *(*get_last_error)(struct mail_storage *storage,
-				      bool *syntax_error_r,
-				      bool *temporary_error_r);
 };
 
 union mail_storage_module_context {

Index: mail-storage.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/mail-storage.c,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -d -r1.77 -r1.78
--- mail-storage.c	30 Mar 2007 18:41:05 -0000	1.77
+++ mail-storage.c	30 Mar 2007 18:57:34 -0000	1.78
@@ -344,8 +344,13 @@
 					bool *syntax_error_r,
 					bool *temporary_error_r)
 {
-	return storage->v.get_last_error(storage, syntax_error_r,
-					 temporary_error_r);
+	*syntax_error_r = storage->syntax_error;
+	*temporary_error_r = storage->temporary_error;
+
+	/* We get here only in error situations, so we have to return some
+	   error. If storage->error is NULL, it means we forgot to set it at
+	   some point.. */
+	return storage->error != NULL ? storage->error : "Unknown error";
 }
 
 const char *mail_storage_get_mailbox_path(struct mail_storage *storage,



More information about the dovecot-cvs mailing list