[dovecot-cvs] dovecot/src/lib-storage/index index-storage.c, 1.85, 1.86

cras at dovecot.org cras at dovecot.org
Tue May 30 16:14:24 EEST 2006


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

Modified Files:
	index-storage.c 
Log Message:
Don't return NULL error messages.



Index: index-storage.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/index-storage.c,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -d -r1.85 -r1.86
--- index-storage.c	9 Apr 2006 15:50:25 -0000	1.85
+++ index-storage.c	30 May 2006 13:14:21 -0000	1.86
@@ -436,7 +436,11 @@
 {
 	*syntax_error_r = storage->syntax_error;
 	*temporary_error_r = storage->temporary_error;
-	return storage->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";
 }
 
 void mail_storage_set_index_error(struct index_mailbox *ibox)



More information about the dovecot-cvs mailing list