[dovecot-cvs] dovecot/src/imap cmd-close.c,1.2,1.3

cras at procontrol.fi cras at procontrol.fi
Sat Nov 2 22:10:23 EET 2002


Update of /home/cvs/dovecot/src/imap
In directory danu:/tmp/cvs-serv8907/imap

Modified Files:
	cmd-close.c 
Log Message:
Mostly mbox locking/syncing fixes. Still some problems though.



Index: cmd-close.c
===================================================================
RCS file: /home/cvs/dovecot/src/imap/cmd-close.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- cmd-close.c	19 Oct 2002 14:51:59 -0000	1.2
+++ cmd-close.c	2 Nov 2002 20:10:20 -0000	1.3
@@ -3,19 +3,23 @@
 #include "common.h"
 #include "commands.h"
 
+static void client_send_untagged_storage_error(Client *client)
+{
+	client_send_line(client, t_strconcat("* NO ",
+		client->storage->get_last_error(client->storage), NULL));
+}
+
 int cmd_close(Client *client)
 {
 	if (!client_verify_open_mailbox(client))
 		return TRUE;
 
-	if (!client->mailbox->expunge(client->mailbox, FALSE)) {
-		/* just warn about the error */
-		client_send_tagline(client, t_strconcat("* NO ",
-			client->storage->get_last_error(client->storage),
-			NULL));
-	}
+	if (!client->mailbox->expunge(client->mailbox, FALSE))
+                client_send_untagged_storage_error(client);
+
+	if (!client->mailbox->close(client->mailbox))
+                client_send_untagged_storage_error(client);
 
-	client->mailbox->close(client->mailbox);
 	client->mailbox = NULL;
 
 	client_send_tagline(client, "OK Close completed.");




More information about the dovecot-cvs mailing list