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
d4de53bb
...
d4de53bb22818c8a7ffa97daa5deeff2e849deff
authored
2004-01-27 15:46:48 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
(imap4d_close): Return NO on failure.
1 parent
a70b333f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
8 deletions
imap4d/close.c
imap4d/close.c
View file @
d4de53b
/* GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 1999, 2001 Free Software Foundation, Inc.
Copyright (C) 1999, 2001
, 2004
Free Software Foundation, Inc.
GNU Mailutils is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
...
...
@@ -20,17 +20,31 @@
/*
*/
/* The CLOSE command permanently removes from the currently selected
mailbox all messages that have the \\Deleted flag set, and returns
to authenticated state from selected state. */
int
imap4d_close
(
struct
imap4d_command
*
command
,
char
*
arg
ARG_UNUSED
)
{
/* FIXME: Check and report errors. */
/* The CLOSE command permanently removes from the currently selected
mailbox all messages that have the \\Deleted flag set, and returns
to authenticated state from selected state. */
mailbox_flush
(
mbox
,
1
);
/* No messages are removed, and no error is give, if the mailbox is
const
char
*
msg
=
NULL
;
int
status
=
mailbox_flush
(
mbox
,
1
);
if
(
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. */
mailbox_close
(
mbox
);
status
=
mailbox_close
(
mbox
);
if
(
status
)
{
syslog
(
LOG_ERR
,
_
(
"closing mailbox failed: %s"
),
mu_strerror
(
status
));
msg
=
"closing mailbox failed"
;
}
mailbox_destroy
(
&
mbox
);
if
(
msg
)
util_finish
(
command
,
RESP_NO
,
msg
);
return
util_finish
(
command
,
RESP_OK
,
"Completed"
);
}
...
...
Please
register
or
sign in
to post a comment