]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Removed UIDPLUS after all, it needs more thinking about with maildir.
authorTimo Sirainen <tss@iki.fi>
Mon, 21 Jun 2004 14:51:04 +0000 (17:51 +0300)
committerTimo Sirainen <tss@iki.fi>
Mon, 21 Jun 2004 14:51:04 +0000 (17:51 +0300)
--HG--
branch : HEAD

configure.in
src/imap/cmd-append.c
src/imap/cmd-copy.c

index 59517fbb4c34cc7108bf2b91af29dcfbb6f75f40..adcaa28db312dfa2f33248241232484337d39861 100644 (file)
@@ -1,7 +1,7 @@
 AC_INIT(src)
 
 AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(dovecot, 1.0-test19)
+AM_INIT_AUTOMAKE(dovecot, 1.0-test20)
 
 AM_MAINTAINER_MODE
 
@@ -1206,7 +1206,7 @@ dnl **
 dnl ** capabilities
 dnl **
 
-capability="IMAP4rev1 SORT THREAD=REFERENCES MULTIAPPEND UNSELECT LITERAL+ IDLE CHILDREN LISTEXT NAMESPACE UIDPLUS"
+capability="IMAP4rev1 SORT THREAD=REFERENCES MULTIAPPEND UNSELECT LITERAL+ IDLE CHILDREN LISTEXT NAMESPACE"
 AC_DEFINE_UNQUOTED(CAPABILITY_STRING, "$capability", IMAP capabilities)
 
 CFLAGS="$CFLAGS $EXTRA_CFLAGS"
index f87cf348336ee238bafe0ccfdaf3d16d2325086a..aab5829471e2d41d64d3f0b1c94899db492fc7a9 100644 (file)
@@ -56,12 +56,9 @@ int cmd_append(struct client *client)
         struct mailbox_keywords old_flags;
        struct mail_full_flags flags;
        struct istream *input;
-       struct mail *mail;
        time_t internal_date;
        const char *mailbox, *internal_date_str;
        uoff_t msg_size;
-       string_t *reply;
-        struct msgset_generator_context msgset_ctx;
        unsigned int count;
        int ret, failed, timezone_offset, nonsync;
 
@@ -88,8 +85,7 @@ int cmd_append(struct client *client)
                }
        }
 
-       if (mailbox_get_status(box, STATUS_KEYWORDS | STATUS_UIDVALIDITY,
-                              &status) < 0) {
+       if (mailbox_get_status(box, STATUS_KEYWORDS, &status) < 0) {
                client_send_storage_error(client, storage);
                mailbox_close(box);
                return TRUE;
@@ -104,10 +100,6 @@ int cmd_append(struct client *client)
        /* if error occurs, the CRLF is already read. */
        client->input_skip_line = FALSE;
 
-       reply = str_new(default_pool, 256);
-       str_printfa(reply, "OK [APPENDUID %u ", status.uidvalidity);
-
-       msgset_generator_init(&msgset_ctx, reply);
        count = 0;
        failed = TRUE;
        save_parser = imap_parser_create(client->input, client->output,
@@ -195,15 +187,13 @@ int cmd_append(struct client *client)
                                              client->input->v_offset,
                                              msg_size);
                if (mailbox_save(t, &flags, internal_date, timezone_offset,
-                                NULL, input, &mail) < 0) {
+                                NULL, input, NULL) < 0) {
                        i_stream_unref(input);
                        client_send_storage_error(client, storage);
                        break;
                }
                i_stream_unref(input);
 
-               msgset_generator_next(&msgset_ctx, mail->uid);
-
                if (client->input->closed)
                        break;
 
@@ -211,8 +201,6 @@ int cmd_append(struct client *client)
        }
         imap_parser_destroy(save_parser);
 
-       msgset_generator_finish(&msgset_ctx);
-
        if (failed)
                mailbox_transaction_rollback(t);
        else {
@@ -227,10 +215,8 @@ int cmd_append(struct client *client)
 
        if (!failed) {
                client_sync_full(client);
-               str_append(reply, "] Append completed.");
-               client_send_tagline(client, str_c(reply));
+               client_send_tagline(client, "OK Append completed.");
        }
-       str_free(reply);
 
        return TRUE;
 }
index ed51733eeae2182cf6a47a18f80459f4513ce6ac..bff008b0ea5744469cd969f5a51615814ac2bfaf 100644 (file)
@@ -7,13 +7,11 @@
 
 static int fetch_and_copy(struct mailbox_transaction_context *t,
                          struct mailbox *srcbox,
-                         struct mail_search_arg *search_args,
-                         string_t *reply)
+                         struct mail_search_arg *search_args)
 {
        struct mail_search_context *search_ctx;
         struct mailbox_transaction_context *src_trans;
-       struct mail *mail, *dest_mail;
-        struct msgset_generator_context srcset_ctx, destset_ctx;
+       struct mail *mail;
        string_t *dest_str;
        int ret;
 
@@ -27,8 +25,6 @@ static int fetch_and_copy(struct mailbox_transaction_context *t,
        }
 
        dest_str = t_str_new(128);
-       msgset_generator_init(&srcset_ctx, reply);
-       msgset_generator_init(&destset_ctx, dest_str);
 
        ret = 1;
        while ((mail = mailbox_search_next(search_ctx)) != NULL) {
@@ -36,25 +32,11 @@ static int fetch_and_copy(struct mailbox_transaction_context *t,
                        ret = 0;
                        break;
                }
-               if (mailbox_copy(t, mail, &dest_mail) < 0) {
+               if (mailbox_copy(t, mail, NULL) < 0) {
                        ret = -1;
                        break;
                }
 
-               msgset_generator_next(&srcset_ctx, mail->uid);
-               msgset_generator_next(&destset_ctx, dest_mail->uid);
-
-       }
-
-       msgset_generator_finish(&srcset_ctx);
-       msgset_generator_finish(&destset_ctx);
-
-       if (str_len(dest_str) == 0)
-               str_truncate(reply, 0);
-       else {
-               str_append_c(reply, ' ');
-               str_append_str(reply, dest_str);
-               str_append(reply, "] Copy completed.");
        }
 
        if (mailbox_search_deinit(search_ctx) < 0)
@@ -72,9 +54,7 @@ int cmd_copy(struct client *client)
        struct mailbox *destbox;
        struct mailbox_transaction_context *t;
         struct mail_search_arg *search_arg;
-       struct mailbox_status status;
        const char *messageset, *mailbox;
-       string_t *reply;
        int ret;
 
        /* <message set> <mailbox> */
@@ -110,18 +90,8 @@ int cmd_copy(struct client *client)
                }
        }
 
-       if (mailbox_get_status(destbox, STATUS_UIDVALIDITY, &status) < 0) {
-               client_send_storage_error(client, storage);
-               if (destbox != client->mailbox)
-                       mailbox_close(destbox);
-               return TRUE;
-       }
-
-       reply = str_new(default_pool, 512);
-       str_printfa(reply, "OK [COPYUID %u ", status.uidvalidity);
-
        t = mailbox_transaction_begin(destbox, FALSE);
-       ret = fetch_and_copy(t, client->mailbox, search_arg, reply);
+       ret = fetch_and_copy(t, client->mailbox, search_arg);
 
        if (ret <= 0)
                mailbox_transaction_rollback(t);
@@ -142,12 +112,7 @@ int cmd_copy(struct client *client)
                        client_sync_full(client);
                else
                        client_sync_full_fast(client);
-               if (str_len(reply) > 0)
-                       client_send_tagline(client, str_c(reply));
-               else {
-                       client_send_tagline(client,
-                               "OK Copy completed, no messages found.");
-               }
+               client_send_tagline(client, "OK Copy completed.");
        }
 
        if (destbox != client->mailbox)