Mercurial > dovecot > original-hg > dovecot-1.2
annotate src/imap/cmd-close.c @ 1445:e29bc94711e2 HEAD
Some fixes to get read-only mboxes working.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Thu, 08 May 2003 07:53:47 +0300 |
parents | 9ced30dda6c3 |
children | db14aa8e2b5c |
rev | line source |
---|---|
0 | 1 /* Copyright (C) 2002 Timo Sirainen */ |
2 | |
3 #include "common.h" | |
4 #include "commands.h" | |
5 | |
903
fd8888f6f037
Naming style changes, finally got tired of most of the typedefs. Also the
Timo Sirainen <tss@iki.fi>
parents:
883
diff
changeset
|
6 int cmd_close(struct client *client) |
0 | 7 { |
1212 | 8 struct mailbox *mailbox = client->mailbox; |
9 | |
0 | 10 if (!client_verify_open_mailbox(client)) |
11 return TRUE; | |
12 | |
1212 | 13 client->mailbox = NULL; |
0 | 14 |
1445
e29bc94711e2
Some fixes to get read-only mboxes working.
Timo Sirainen <tss@iki.fi>
parents:
1212
diff
changeset
|
15 if (!mailbox->readonly) { |
e29bc94711e2
Some fixes to get read-only mboxes working.
Timo Sirainen <tss@iki.fi>
parents:
1212
diff
changeset
|
16 if (!mailbox->expunge(mailbox, FALSE)) |
e29bc94711e2
Some fixes to get read-only mboxes working.
Timo Sirainen <tss@iki.fi>
parents:
1212
diff
changeset
|
17 client_send_untagged_storage_error(client); |
e29bc94711e2
Some fixes to get read-only mboxes working.
Timo Sirainen <tss@iki.fi>
parents:
1212
diff
changeset
|
18 } |
559
c834e77b624c
Mostly mbox locking/syncing fixes. Still some problems though.
Timo Sirainen <tss@iki.fi>
parents:
450
diff
changeset
|
19 |
1212 | 20 if (!mailbox->close(mailbox)) |
21 client_send_untagged_storage_error(client); | |
0 | 22 |
23 client_send_tagline(client, "OK Close completed."); | |
24 return TRUE; | |
25 } |