Mercurial > dovecot > original-hg > dovecot-1.2
annotate src/imap/cmd-close.c @ 450:925d6eb5f8be HEAD
MailStorage interface change. We now let storage call several sync-functions
whenever it wants instead of forcing it through sync() function.
This now allows us to send client FLAGS and PERMANENTFLAGS messages whenever
new custom flags are added. Also EXPUNGE command now goes nicely through
expunge() function (which CLOSE used) instead of through flag in sync().
"Out of disk space" alert is also sent now whenever it happens, before it
was sent only when opening mailbox.
Message set parser now complains when referencing mail sequences outside the
possible range. Modify log before sent flags/expunges changes to client even
if it didn't know about those messages yet. Also some other smaller
cleanups.
Beginnings of fixing APPEND and COPY when trying to store mails into
selected mailbox. Before this didn't work too well or simply broke things.
Still broken, needs a bit more changes..
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sat, 19 Oct 2002 17:51:59 +0300 |
parents | 3b1985cbc908 |
children | c834e77b624c |
rev | line source |
---|---|
0 | 1 /* Copyright (C) 2002 Timo Sirainen */ |
2 | |
3 #include "common.h" | |
4 #include "commands.h" | |
5 | |
6 int cmd_close(Client *client) | |
7 { | |
8 if (!client_verify_open_mailbox(client)) | |
9 return TRUE; | |
10 | |
450
925d6eb5f8be
MailStorage interface change. We now let storage call several sync-functions
Timo Sirainen <tss@iki.fi>
parents:
0
diff
changeset
|
11 if (!client->mailbox->expunge(client->mailbox, FALSE)) { |
925d6eb5f8be
MailStorage interface change. We now let storage call several sync-functions
Timo Sirainen <tss@iki.fi>
parents:
0
diff
changeset
|
12 /* just warn about the error */ |
925d6eb5f8be
MailStorage interface change. We now let storage call several sync-functions
Timo Sirainen <tss@iki.fi>
parents:
0
diff
changeset
|
13 client_send_tagline(client, t_strconcat("* NO ", |
925d6eb5f8be
MailStorage interface change. We now let storage call several sync-functions
Timo Sirainen <tss@iki.fi>
parents:
0
diff
changeset
|
14 client->storage->get_last_error(client->storage), |
925d6eb5f8be
MailStorage interface change. We now let storage call several sync-functions
Timo Sirainen <tss@iki.fi>
parents:
0
diff
changeset
|
15 NULL)); |
925d6eb5f8be
MailStorage interface change. We now let storage call several sync-functions
Timo Sirainen <tss@iki.fi>
parents:
0
diff
changeset
|
16 } |
0 | 17 |
18 client->mailbox->close(client->mailbox); | |
19 client->mailbox = NULL; | |
20 | |
21 client_send_tagline(client, "OK Close completed."); | |
22 return TRUE; | |
23 } |