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
9a3f34b8
...
9a3f34b8193c5e676e48219822a095cdcbe19be8
authored
2002-08-04 08:12:20 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
(imap4d_select_status): Run imap4d_sync() to output EXISTS and RECENT untagged responses.
1 parent
8f1f2636
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
18 deletions
imap4d/select.c
imap4d/select.c
View file @
9a3f34b
...
...
@@ -62,19 +62,18 @@ imap4d_select0 (struct imap4d_command *command, char *arg, int flags)
return
util_finish
(
command
,
RESP_NO
,
"Couldn't open mailbox"
);
if
((
status
=
mailbox_create
(
&
mbox
,
mailbox_name
))
==
0
&&
(
status
=
mailbox_open
(
mbox
,
flags
))
==
0
)
&&
(
status
=
mailbox_open
(
mbox
,
flags
))
==
0
)
{
select_flags
=
flags
;
state
=
STATE_SEL
;
if
((
status
=
imap4d_select_status
())
==
0
)
{
free
(
mailbox_name
);
/* Need to set the state explicitely for select. */
return
util_send
(
"%s OK [%s] %s Completed
\r\n
"
,
command
->
tag
,
(
MU_STREAM_READ
==
flags
)
?
"READ-ONLY"
:
"READ-WRITE"
,
command
->
name
);
}
{
free
(
mailbox_name
);
/* Need to set the state explicitely for select. */
return
util_send
(
"%s OK [%s] %s Completed
\r\n
"
,
command
->
tag
,
(
MU_STREAM_READ
==
flags
)
?
"READ-ONLY"
:
"READ-WRITE"
,
command
->
name
);
}
}
status
=
util_finish
(
command
,
RESP_NO
,
"Couldn't open %s, %s"
,
mailbox_name
,
mu_errstring
(
status
));
...
...
@@ -95,17 +94,15 @@ imap4d_select_status ()
if
(
state
!=
STATE_SEL
)
return
0
;
/* FIXME: this should be something! */
if
(
(
status
=
mailbox_uidvalidity
(
mbox
,
&
uidvalidity
))
||
(
status
=
mailbox_uidnext
(
mbox
,
&
uidnext
))
||
(
status
=
mailbox_messages_count
(
mbox
,
&
count
))
||
(
status
=
mailbox_messages_recent
(
mbox
,
&
recent
))
||
(
status
=
mailbox_message_unseen
(
mbox
,
&
unseen
))
)
if
((
status
=
mailbox_uidvalidity
(
mbox
,
&
uidvalidity
))
||
(
status
=
mailbox_uidnext
(
mbox
,
&
uidnext
))
||
(
status
=
mailbox_messages_count
(
mbox
,
&
count
))
||
(
status
=
mailbox_messages_recent
(
mbox
,
&
recent
))
||
(
status
=
mailbox_message_unseen
(
mbox
,
&
unseen
)))
return
status
;
util_out
(
RESP_NONE
,
"%d EXISTS"
,
count
);
util_out
(
RESP_NONE
,
"%d RECENT"
,
recent
);
/* This outputs EXISTS and RECENT responses */
imap4d_sync
(
);
util_out
(
RESP_OK
,
"[UIDVALIDITY %d] UID valididy status"
,
uidvalidity
);
util_out
(
RESP_OK
,
"[UIDNEXT %d] Predicted next uid"
,
uidnext
);
if
(
unseen
)
...
...
Please
register
or
sign in
to post a comment