annotate src/imap/cmd-check.c @ 6454:b5e6543b4385 HEAD

Make sure we do a mailbox sync after flag updates (STORE, FETCH). Also added a new IMAP_SYNC_FLAG_SAFE which is used to figure out if appends and expunges are safe to send to client when delay-newmail workaround is enabled.
author Timo Sirainen <tss@iki.fi>
date Sat, 22 Sep 2007 13:55:36 +0300
parents 65c69a53a7be
children 7ed926ed7aa4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6429
65c69a53a7be Replaced my Copyright notices. The year range always ends with 2007 now.
Timo Sirainen <tss@iki.fi>
parents: 3863
diff changeset
1 /* Copyright (c) 2002-2007 Dovecot authors, see the included COPYING file */
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
3 #include "common.h"
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
4 #include "commands.h"
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
5
3863
55df57c028d4 Added "bool" type and changed all ints that were used as booleans to bool.
Timo Sirainen <tss@iki.fi>
parents: 3765
diff changeset
6 bool cmd_check(struct client_command_context *cmd)
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
7 {
3141
61abed5f7864 Moved command-specific variables from struct client to struct
Timo Sirainen <tss@iki.fi>
parents: 2665
diff changeset
8 if (!client_verify_open_mailbox(cmd))
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
9 return TRUE;
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
10
3141
61abed5f7864 Moved command-specific variables from struct client to struct
Timo Sirainen <tss@iki.fi>
parents: 2665
diff changeset
11 return cmd_sync(cmd, MAILBOX_SYNC_FLAG_FULL_READ |
6454
b5e6543b4385 Make sure we do a mailbox sync after flag updates (STORE, FETCH). Also added
Timo Sirainen <tss@iki.fi>
parents: 6429
diff changeset
12 MAILBOX_SYNC_FLAG_FULL_WRITE, IMAP_SYNC_FLAG_SAFE,
b5e6543b4385 Make sure we do a mailbox sync after flag updates (STORE, FETCH). Also added
Timo Sirainen <tss@iki.fi>
parents: 6429
diff changeset
13 "OK Check completed.");
0
3b1985cbc908 Initial revision
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
14 }