[dovecot-cvs] dovecot/src/imap cmd-fetch.c, 1.35, 1.36 commands-util.c, 1.56, 1.57 imap-search.c, 1.18, 1.19

tss at dovecot.org tss at dovecot.org
Sun May 13 20:10:51 EEST 2007


Update of /var/lib/cvs/dovecot/src/imap
In directory talvi:/tmp/cvs-serv20721/imap

Modified Files:
	cmd-fetch.c commands-util.c imap-search.c 
Log Message:
Error handling rewrite.



Index: cmd-fetch.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/cmd-fetch.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- cmd-fetch.c	13 May 2007 15:46:07 -0000	1.35
+++ cmd-fetch.c	13 May 2007 17:10:48 -0000	1.36
@@ -78,8 +78,8 @@
 
 	if (ctx->failed) {
 		struct mail_storage *storage;
-		const char *error;
-		bool temporary_error;
+		const char *error_string;
+		enum mail_error error;
 
 		if (ctx->client->output->closed) {
 			client_disconnect(cmd->client, "Disconnected");
@@ -87,11 +87,11 @@
 		}
 
                 storage = mailbox_get_storage(cmd->client->mailbox);
-		error = mail_storage_get_last_error(storage, &temporary_error);
+		error_string = mail_storage_get_last_error(storage, &error);
 
 		/* We never want to reply NO to FETCH requests,
 		   BYE is preferrable (see imap-ml for reasons). */
-		client_disconnect_with_error(cmd->client, error);
+		client_disconnect_with_error(cmd->client, error_string);
 		return TRUE;
 	}
 

Index: commands-util.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/commands-util.c,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -d -r1.56 -r1.57
--- commands-util.c	13 May 2007 16:13:48 -0000	1.56
+++ commands-util.c	13 May 2007 17:10:48 -0000	1.57
@@ -146,18 +146,18 @@
 void client_send_list_error(struct client_command_context *cmd,
 			    struct mailbox_list *list)
 {
-	const char *error;
-	bool temporary_error;
+	const char *error_string;
+	enum mail_error error;
 
-	error = mailbox_list_get_last_error(list, &temporary_error);
-	client_send_tagline(cmd, t_strconcat("NO ", error, NULL));
+	error_string = mailbox_list_get_last_error(list, &error);
+	client_send_tagline(cmd, t_strconcat("NO ", error_string, NULL));
 }
 
 void client_send_storage_error(struct client_command_context *cmd,
 			       struct mail_storage *storage)
 {
-	const char *error;
-	bool temporary_error;
+	const char *error_string;
+	enum mail_error error;
 
 	if (cmd->client->mailbox != NULL &&
 	    mailbox_is_inconsistent(cmd->client->mailbox)) {
@@ -167,15 +167,15 @@
 		return;
 	}
 
-	error = mail_storage_get_last_error(storage, &temporary_error);
-	client_send_tagline(cmd, t_strconcat("NO ", error, NULL));
+	error_string = mail_storage_get_last_error(storage, &error);
+	client_send_tagline(cmd, t_strconcat("NO ", error_string, NULL));
 }
 
 void client_send_untagged_storage_error(struct client *client,
 					struct mail_storage *storage)
 {
-	const char *error;
-	bool temporary_error;
+	const char *error_string;
+	enum mail_error error;
 
 	if (client->mailbox != NULL &&
 	    mailbox_is_inconsistent(client->mailbox)) {
@@ -185,8 +185,8 @@
 		return;
 	}
 
-	error = mail_storage_get_last_error(storage, &temporary_error);
-	client_send_line(client, t_strconcat("* NO ", error, NULL));
+	error_string = mail_storage_get_last_error(storage, &error);
+	client_send_line(client, t_strconcat("* NO ", error_string, NULL));
 }
 
 static bool is_valid_keyword(struct client_command_context *cmd,

Index: imap-search.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/imap-search.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- imap-search.c	13 May 2007 15:46:07 -0000	1.18
+++ imap-search.c	13 May 2007 17:10:48 -0000	1.19
@@ -19,7 +19,7 @@
 		  struct mail_search_seqset **seqset_r, const char **error_r)
 {
 	struct mail_search_seqset *seqset, **p;
-	bool temporary, last;
+	bool last;
 
 	*seqset_r = imap_messageset_parse(pool, uidset);
 	if (*seqset_r == NULL) {
@@ -38,8 +38,9 @@
 		if (mailbox_get_uids(box, seqset->seq1, seqset->seq2,
 				     &seqset->seq1, &seqset->seq2) < 0) {
 			struct mail_storage *storage = mailbox_get_storage(box);
-			*error_r = mail_storage_get_last_error(storage,
-							       &temporary);
+			enum mail_error error;
+
+			*error_r = mail_storage_get_last_error(storage, &error);
 			return -1;
 		}
 



More information about the dovecot-cvs mailing list