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
7b066136
...
7b066136682706f5a296d295fefcb477b7419988
authored
2002-08-05 08:19:00 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Remove state check.
1 parent
c841c9ed
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
1 additions
and
61 deletions
imap4d/append.c
imap4d/authenticate.c
imap4d/check.c
imap4d/close.c
imap4d/copy.c
imap4d/create.c
imap4d/delete.c
imap4d/examine.c
imap4d/expunge.c
imap4d/fetch.c
imap4d/login.c
imap4d/logout.c
imap4d/lsub.c
imap4d/namespace.c
imap4d/noop.c
imap4d/rename.c
imap4d/search.c
imap4d/select.c
imap4d/status.c
imap4d/store.c
imap4d/subscribe.c
imap4d/uid.c
imap4d/unsubscribe.c
imap4d/append.c
View file @
7b06613
...
...
@@ -27,9 +27,6 @@ imap4d_append (struct imap4d_command *command, char *arg)
mailbox_t
dest_mbox
=
NULL
;
int
status
;
if
(
!
(
command
->
states
&
state
))
return
util_finish
(
command
,
RESP_BAD
,
"Wrong state"
);
mboxname
=
util_getword
(
arg
,
&
sp
);
if
(
!
mboxname
)
return
util_finish
(
command
,
RESP_BAD
,
"Too few arguments"
);
...
...
imap4d/authenticate.c
View file @
7b06613
...
...
@@ -37,9 +37,6 @@ imap4d_authenticate (struct imap4d_command *command, char *arg)
struct
imap_auth
*
ap
;
char
*
username
=
NULL
;
if
(
!
(
command
->
states
&
state
))
return
util_finish
(
command
,
RESP_BAD
,
"Wrong state"
);
auth_type
=
util_getword
(
arg
,
&
sp
);
util_unquote
(
&
auth_type
);
if
(
!
auth_type
)
...
...
imap4d/check.c
View file @
7b06613
...
...
@@ -27,7 +27,5 @@ int
imap4d_check
(
struct
imap4d_command
*
command
,
char
*
arg
)
{
(
void
)
arg
;
if
(
!
(
command
->
states
&
state
))
return
util_finish
(
command
,
RESP_BAD
,
"Wrong state"
);
return
util_finish
(
command
,
RESP_OK
,
"Completed"
);
}
...
...
imap4d/close.c
View file @
7b06613
...
...
@@ -24,8 +24,6 @@ int
imap4d_close
(
struct
imap4d_command
*
command
,
char
*
arg
)
{
(
void
)
arg
;
if
(
!
(
command
->
states
&
state
))
return
util_finish
(
command
,
RESP_BAD
,
"Wrong state"
);
/* 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
...
...
imap4d/copy.c
View file @
7b06613
...
...
@@ -27,9 +27,6 @@ imap4d_copy (struct imap4d_command *command, char *arg)
int
rc
;
char
buffer
[
64
];
if
(
!
(
command
->
states
&
state
))
return
util_finish
(
command
,
RESP_BAD
,
"Wrong state"
);
rc
=
imap4d_copy0
(
arg
,
0
,
buffer
,
sizeof
buffer
);
if
(
rc
==
RESP_NONE
)
{
...
...
imap4d/create.c
View file @
7b06613
...
...
@@ -35,9 +35,6 @@ imap4d_create (struct imap4d_command *command, char *arg)
int
rc
=
RESP_OK
;
const
char
*
msg
=
"Completed"
;
if
(
!
(
command
->
states
&
state
))
return
util_finish
(
command
,
RESP_BAD
,
"Wrong state"
);
name
=
util_getword
(
arg
,
&
sp
);
if
(
!
name
)
return
util_finish
(
command
,
RESP_BAD
,
"Too few arguments"
);
...
...
imap4d/delete.c
View file @
7b06613
...
...
@@ -30,9 +30,6 @@ imap4d_delete (struct imap4d_command *command, char *arg)
const
char
*
delim
=
"/"
;
char
*
name
;
if
(
!
(
command
->
states
&
state
))
return
util_finish
(
command
,
RESP_BAD
,
"Wrong state"
);
name
=
util_getword
(
arg
,
&
sp
);
util_unquote
(
&
name
);
if
(
!
name
||
*
name
==
'\0'
)
...
...
imap4d/examine.c
View file @
7b06613
...
...
@@ -24,7 +24,5 @@
int
imap4d_examine
(
struct
imap4d_command
*
command
,
char
*
arg
)
{
if
(
!
(
command
->
states
&
state
))
return
util_finish
(
command
,
RESP_BAD
,
"Wrong state"
);
return
imap4d_select0
(
command
,
arg
,
MU_STREAM_READ
);
}
...
...
imap4d/expunge.c
View file @
7b06613
...
...
@@ -26,8 +26,6 @@ imap4d_expunge (struct imap4d_command *command, char *arg)
{
char
*
sp
=
NULL
;
if
(
!
(
command
->
states
&
state
))
return
util_finish
(
command
,
RESP_BAD
,
"Wrong state"
);
if
(
util_getword
(
arg
,
&
sp
))
return
util_finish
(
command
,
RESP_NO
,
"Too many args"
);
...
...
imap4d/fetch.c
View file @
7b06613
...
...
@@ -126,9 +126,6 @@ imap4d_fetch (struct imap4d_command *command, char *arg)
int
rc
;
char
buffer
[
64
];
if
(
!
(
command
->
states
&
state
))
return
util_finish
(
command
,
RESP_BAD
,
"Wrong state"
);
rc
=
imap4d_fetch0
(
arg
,
0
,
buffer
,
sizeof
buffer
);
return
util_finish
(
command
,
rc
,
buffer
);
}
...
...
imap4d/login.c
View file @
7b06613
...
...
@@ -85,8 +85,6 @@ imap4d_login (struct imap4d_command *command, char *arg)
int
pamerror
;
#endif
/* !USE_LIBPAM */
if
(
!
(
command
->
states
&
state
))
return
util_finish
(
command
,
RESP_BAD
,
"Wrong state"
);
username
=
util_getword
(
arg
,
&
sp
);
pass
=
util_getword
(
NULL
,
&
sp
);
...
...
imap4d/logout.c
View file @
7b06613
...
...
@@ -25,8 +25,6 @@ int
imap4d_logout
(
struct
imap4d_command
*
command
,
char
*
arg
)
{
char
*
sp
=
NULL
;
if
(
!
(
command
->
states
&
state
))
return
util_finish
(
command
,
RESP_BAD
,
"Wrong state"
);
if
(
util_getword
(
arg
,
&
sp
))
return
util_finish
(
command
,
RESP_BAD
,
"Too many args"
);
imap4d_bye0
(
OK
,
command
);
...
...
imap4d/lsub.c
View file @
7b06613
...
...
@@ -32,9 +32,6 @@ imap4d_lsub (struct imap4d_command *command, char *arg)
const
char
*
delim
=
"/"
;
FILE
*
fp
;
if
(
!
(
command
->
states
&
state
))
return
util_finish
(
command
,
RESP_BAD
,
"Wrong state"
);
ref
=
util_getword
(
arg
,
&
sp
);
wcard
=
util_getword
(
NULL
,
&
sp
);
if
(
!
ref
||
!
wcard
)
...
...
imap4d/namespace.c
View file @
7b06613
...
...
@@ -115,8 +115,6 @@ namespace_enumerate_all(nsfp_t f, void *closure)
int
imap4d_namespace
(
struct
imap4d_command
*
command
,
char
*
arg
)
{
if
(
!
(
command
->
states
&
state
))
return
util_finish
(
command
,
RESP_BAD
,
"Wrong state"
);
if
(
*
arg
)
return
util_finish
(
command
,
RESP_BAD
,
"Too many arguments"
);
...
...
@@ -171,7 +169,7 @@ char *
namespace_checkfullpath
(
char
*
name
,
const
char
*
pattern
,
const
char
*
delim
)
{
struct
namespace_info
info
;
char
*
path
=
util_getfullpath
(
name
,
delim
);
char
*
path
=
util_getfullpath
(
name
,
delim
);
if
(
!
path
)
return
path
;
...
...
imap4d/noop.c
View file @
7b06613
...
...
@@ -23,8 +23,6 @@ imap4d_noop (struct imap4d_command *command, char *arg)
{
char
*
sp
=
NULL
;
if
(
!
(
command
->
states
&
state
))
return
util_finish
(
command
,
RESP_BAD
,
"Wrong state"
);
if
(
util_getword
(
arg
,
&
sp
))
return
util_finish
(
command
,
RESP_BAD
,
"Too many args"
);
...
...
imap4d/rename.c
View file @
7b06613
...
...
@@ -32,9 +32,6 @@ imap4d_rename (struct imap4d_command *command, char *arg)
struct
stat
newst
;
const
char
*
delim
=
"/"
;
if
(
!
(
command
->
states
&
state
))
return
util_finish
(
command
,
RESP_BAD
,
"Wrong state"
);
oldname
=
util_getword
(
arg
,
&
sp
);
newname
=
util_getword
(
NULL
,
&
sp
);
if
(
!
newname
||
!
oldname
)
...
...
imap4d/search.c
View file @
7b06613
...
...
@@ -194,9 +194,6 @@ imap4d_search (struct imap4d_command *command, char *arg)
int
rc
;
char
buffer
[
64
];
if
(
!
(
command
->
states
&
state
))
return
util_finish
(
command
,
RESP_BAD
,
"Wrong state"
);
rc
=
imap4d_search0
(
arg
,
0
,
buffer
,
sizeof
buffer
);
return
util_finish
(
command
,
rc
,
buffer
);
}
...
...
imap4d/select.c
View file @
7b06613
...
...
@@ -24,8 +24,6 @@ static int select_flags;
int
imap4d_select
(
struct
imap4d_command
*
command
,
char
*
arg
)
{
if
(
!
(
command
->
states
&
state
))
return
util_finish
(
command
,
RESP_BAD
,
"Wrong state"
);
return
imap4d_select0
(
command
,
arg
,
MU_STREAM_RDWR
);
}
...
...
imap4d/status.c
View file @
7b06613
...
...
@@ -64,9 +64,6 @@ imap4d_status (struct imap4d_command *command, char *arg)
int
count
=
0
;
char
*
err_msg
=
NULL
;
if
(
!
(
command
->
states
&
state
))
return
util_finish
(
command
,
RESP_BAD
,
"Wrong state"
);
name
=
util_getword
(
arg
,
&
sp
);
util_unquote
(
&
name
);
if
(
!
name
||
*
name
==
'\0'
||
!
sp
||
*
sp
==
'\0'
)
...
...
imap4d/store.c
View file @
7b06613
...
...
@@ -27,9 +27,6 @@ imap4d_store (struct imap4d_command *command, char *arg)
int
rc
;
char
buffer
[
64
];
if
(
!
(
command
->
states
&
state
))
return
util_finish
(
command
,
RESP_BAD
,
"Wrong state"
);
rc
=
imap4d_store0
(
arg
,
0
,
buffer
,
sizeof
buffer
);
return
util_finish
(
command
,
rc
,
buffer
);
}
...
...
imap4d/subscribe.c
View file @
7b06613
...
...
@@ -29,9 +29,6 @@ imap4d_subscribe (struct imap4d_command *command, char *arg)
char
*
file
;
FILE
*
fp
;
if
(
!
(
command
->
states
&
state
))
return
util_finish
(
command
,
RESP_BAD
,
"Wrong state"
);
name
=
util_getword
(
arg
,
&
sp
);
util_unquote
(
&
name
);
if
(
!
name
||
*
name
==
'\0'
)
...
...
imap4d/uid.c
View file @
7b06613
...
...
@@ -30,9 +30,6 @@ imap4d_uid (struct imap4d_command *command, char *arg)
int
rc
=
RESP_NO
;
char
buffer
[
64
];
if
(
!
(
command
->
states
&
state
))
return
util_finish
(
command
,
RESP_BAD
,
"Wrong state"
);
cmd
=
util_getword
(
arg
,
&
sp
);
if
(
!
cmd
)
util_finish
(
command
,
RESP_BAD
,
"Too few args"
);
...
...
imap4d/unsubscribe.c
View file @
7b06613
...
...
@@ -29,9 +29,6 @@ imap4d_unsubscribe (struct imap4d_command *command, char *arg)
char
*
file
;
FILE
*
fp
;
if
(
!
(
command
->
states
&
state
))
return
util_finish
(
command
,
RESP_BAD
,
"Wrong state"
);
name
=
util_getword
(
arg
,
&
sp
);
util_unquote
(
&
name
);
if
(
!
name
||
*
name
==
'\0'
)
...
...
Please
register
or
sign in
to post a comment