[dovecot-cvs] dovecot/src/imap cmd-store.c,1.24,1.25
cras at dovecot.org
cras at dovecot.org
Wed Aug 18 08:10:48 EEST 2004
- Previous message: [dovecot-cvs] dovecot/src/lib buffer.c,1.15,1.16 buffer.h,1.8,1.9
- Next message: [dovecot-cvs] dovecot/src/imap client.c, 1.38, 1.39 client.h, 1.20,
1.21 cmd-list.c, 1.39, 1.40 commands-util.c, 1.34, 1.35
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/dovecot/src/imap
In directory talvi:/tmp/cvs-serv26508
Modified Files:
cmd-store.c
Log Message:
Don't do separate kludging for readonly mailboxes.
Index: cmd-store.c
===================================================================
RCS file: /home/cvs/dovecot/src/imap/cmd-store.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- cmd-store.c 12 Jul 2004 11:35:50 -0000 1.24
+++ cmd-store.c 18 Aug 2004 05:10:45 -0000 1.25
@@ -35,29 +35,6 @@
return TRUE;
}
-static int mail_send_flags(struct client *client, struct mail *mail)
-{
- const struct mail_full_flags *flags;
- string_t *str;
-
- flags = mail->get_flags(mail);
- if (flags == NULL)
- return FALSE;
-
- t_push();
- str = t_str_new(128);
- str_printfa(str, "* %u FETCH (FLAGS (", mail->seq);
- imap_write_flags(str, flags);
- if (client->cmd_uid)
- str_printfa(str, ") UID %u)", mail->uid);
- else
- str_append(str, "))");
- client_send_line(client, str_c(str));
- t_pop();
-
- return TRUE;
-}
-
int cmd_store(struct client *client)
{
struct imap_arg *args;
@@ -69,7 +46,7 @@
struct mailbox_transaction_context *t;
struct mail *mail;
const char *messageset, *item;
- int silent, modify, failed = FALSE;
+ int silent, failed;
if (!client_read_args(client, 0, 0, &args))
return FALSE;
@@ -106,34 +83,14 @@
return TRUE;
t = mailbox_transaction_begin(box, silent);
- if (!mailbox_is_readonly(box))
- modify = TRUE;
- else {
- /* flag changes will fail, notify client about them */
- modify = FALSE;
- }
-
- search_ctx = failed ? NULL :
- mailbox_search_init(t, NULL, search_arg, NULL,
- MAIL_FETCH_FLAGS, NULL);
+ search_ctx = mailbox_search_init(t, NULL, search_arg, NULL,
+ MAIL_FETCH_FLAGS, NULL);
- if (search_ctx == NULL)
- failed = TRUE;
- else {
- failed = FALSE;
- while ((mail = mailbox_search_next(search_ctx)) != NULL) {
- if (modify) {
- if (mail->update_flags(mail, &flags,
- modify_type) < 0) {
- failed = TRUE;
- break;
- }
- } else {
- if (!mail_send_flags(client, mail)) {
- failed = TRUE;
- break;
- }
- }
+ failed = FALSE;
+ while ((mail = mailbox_search_next(search_ctx)) != NULL) {
+ if (mail->update_flags(mail, &flags, modify_type) < 0) {
+ failed = TRUE;
+ break;
}
}
- Previous message: [dovecot-cvs] dovecot/src/lib buffer.c,1.15,1.16 buffer.h,1.8,1.9
- Next message: [dovecot-cvs] dovecot/src/imap client.c, 1.38, 1.39 client.h, 1.20,
1.21 cmd-list.c, 1.39, 1.40 commands-util.c, 1.34, 1.35
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the dovecot-cvs
mailing list