]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Give BAD instead of NO when trying to use selected state command in
authorTimo Sirainen <tss@iki.fi>
Tue, 22 Apr 2003 18:37:58 +0000 (21:37 +0300)
committerTimo Sirainen <tss@iki.fi>
Tue, 22 Apr 2003 18:37:58 +0000 (21:37 +0300)
non-selected state.

--HG--
branch : HEAD

src/imap/commands-util.c

index f067bbd440d2489dc8c0208711d36cdf9056ff3f..c1c04949bf1981e6d029f759cab75f30b87bfe64 100644 (file)
@@ -86,21 +86,25 @@ int client_verify_open_mailbox(struct client *client)
        if (client->mailbox != NULL)
                return TRUE;
        else {
-               client_send_tagline(client, "NO No mailbox selected.");
+               client_send_tagline(client, "BAD No mailbox selected.");
                return FALSE;
        }
 }
 
 void client_sync_full(struct client *client)
 {
-       if (client->mailbox != NULL)
-               (void)client->mailbox->sync(client->mailbox, TRUE);
+       if (client->mailbox != NULL) {
+               if (!client->mailbox->sync(client->mailbox, TRUE))
+                        client_send_untagged_storage_error(client);
+       }
 }
 
 void client_sync_without_expunges(struct client *client)
 {
-       if (client->mailbox != NULL)
-               (void)client->mailbox->sync(client->mailbox, FALSE);
+       if (client->mailbox != NULL) {
+               if (!client->mailbox->sync(client->mailbox, FALSE))
+                       client_send_untagged_storage_error(client);
+       }
 }
 
 void client_send_storage_error(struct client *client)