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

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


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

Modified Files:
      Tag: branch_1_0
	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.85.2.1
diff -u -d -r1.85 -r1.85.2.1
--- index-storage.c	9 Apr 2006 15:50:25 -0000	1.85
+++ index-storage.c	30 May 2006 13:14:15 -0000	1.85.2.1
@@ -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