Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
mailutils
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
73218069
...
73218069f98318f84c77ffc7ac0c89230dd457e0
authored
2005-06-23 13:24:56 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Do not attempt to flush a mailbox opened in read-only mode.
1 parent
69ad872f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
imap4d/close.c
imap4d/close.c
View file @
7321806
...
...
@@ -28,12 +28,19 @@ int
imap4d_close
(
struct
imap4d_command
*
command
,
char
*
arg
ARG_UNUSED
)
{
const
char
*
msg
=
NULL
;
int
status
=
mailbox_flush
(
mbox
,
1
);
int
status
,
flags
;
mailbox_get_flags
(
mbox
,
&
flags
);
if
((
flags
&
MU_STREAM_READ
)
==
0
)
{
status
=
mailbox_flush
(
mbox
,
1
);
if
(
status
)
{
syslog
(
LOG_ERR
,
_
(
"flushing mailbox failed: %s"
),
mu_strerror
(
status
));
syslog
(
LOG_ERR
,
_
(
"flushing mailbox failed: %s"
),
mu_strerror
(
status
));
msg
=
"flushing mailbox failed"
;
}
}
/* No messages are removed, and no error is given, if the mailbox is
selected by an EXAMINE command or is otherwise selected read-only. */
...
...
@@ -46,6 +53,6 @@ imap4d_close (struct imap4d_command *command, char *arg ARG_UNUSED)
mailbox_destroy
(
&
mbox
);
if
(
msg
)
util_finish
(
command
,
RESP_NO
,
msg
);
return
util_finish
(
command
,
RESP_NO
,
msg
);
return
util_finish
(
command
,
RESP_OK
,
"Completed"
);
}
...
...
Please
register
or
sign in
to post a comment