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
ab4d428e
...
ab4d428ed68026a722481de0b8e44cab50224fa2
authored
2010-09-07 22:54:40 +0300
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Rename XSCRIPT_ macros to MU_XSCRIPT.
1 parent
08dbbe2a
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
39 additions
and
38 deletions
examples/pop3client.c
imap4d/fetch.c
imap4d/imap4d.c
imap4d/io.c
imap4d/uid.c
imap4d/util.c
include/mailutils/stream.h
libproto/pop/mbox.c
libproto/pop/pop3_pass.c
libproto/pop/pop3_retr.c
libproto/pop/pop3_stream.c
libproto/pop/pop3_top.c
libproto/pop/pop3_trace.c
mailbox/xscript-stream.c
pop3d/extra.c
pop3d/retr.c
pop3d/top.c
pop3d/user.c
examples/pop3client.c
View file @
ab4d428
...
...
@@ -519,9 +519,9 @@ static int
string_to_xlev
(
const
char
*
name
,
int
*
pv
)
{
if
(
strcmp
(
name
,
"secure"
)
==
0
)
*
pv
=
XSCRIPT_SECURE
;
*
pv
=
MU_
XSCRIPT_SECURE
;
else
if
(
strcmp
(
name
,
"payload"
)
==
0
)
*
pv
=
XSCRIPT_PAYLOAD
;
*
pv
=
MU_
XSCRIPT_PAYLOAD
;
else
return
1
;
return
0
;
...
...
@@ -568,12 +568,12 @@ set_verbose_mask (mu_pop3_t p)
{
if
(
p
)
{
mu_pop3_trace_mask
(
p
,
QRY_VERBOSE_MASK
(
XSCRIPT_SECURE
)
mu_pop3_trace_mask
(
p
,
QRY_VERBOSE_MASK
(
MU_
XSCRIPT_SECURE
)
?
MU_POP3_TRACE_SET
:
MU_POP3_TRACE_CLR
,
XSCRIPT_SECURE
);
mu_pop3_trace_mask
(
p
,
QRY_VERBOSE_MASK
(
XSCRIPT_PAYLOAD
)
MU_
XSCRIPT_SECURE
);
mu_pop3_trace_mask
(
p
,
QRY_VERBOSE_MASK
(
MU_
XSCRIPT_PAYLOAD
)
?
MU_POP3_TRACE_SET
:
MU_POP3_TRACE_CLR
,
XSCRIPT_PAYLOAD
);
MU_
XSCRIPT_PAYLOAD
);
}
}
...
...
@@ -589,12 +589,12 @@ com_verbose (int argc, char **argv)
{
char
*
delim
=
" ("
;
if
(
QRY_VERBOSE_MASK
(
XSCRIPT_SECURE
))
if
(
QRY_VERBOSE_MASK
(
MU_
XSCRIPT_SECURE
))
{
printf
(
"%ssecure"
,
delim
);
delim
=
", "
;
}
if
(
QRY_VERBOSE_MASK
(
XSCRIPT_PAYLOAD
))
if
(
QRY_VERBOSE_MASK
(
MU_
XSCRIPT_PAYLOAD
))
printf
(
"%spayload"
,
delim
);
printf
(
")"
);
}
...
...
imap4d/fetch.c
View file @
ab4d428
...
...
@@ -1679,7 +1679,7 @@ imap4d_fetch (struct imap4d_command *command, imap4d_tokbuf_t tok)
{
int
rc
;
char
*
err_text
=
"Completed"
;
int
xlev
=
set_xscript_level
(
XSCRIPT_PAYLOAD
);
int
xlev
=
set_xscript_level
(
MU_
XSCRIPT_PAYLOAD
);
rc
=
imap4d_fetch0
(
tok
,
0
,
&
err_text
);
set_xscript_level
(
xlev
);
return
io_completion_response
(
command
,
rc
,
"%s"
,
err_text
);
...
...
imap4d/imap4d.c
View file @
ab4d428
...
...
@@ -422,7 +422,8 @@ imap4d_mainloop (int fd, FILE *infile, FILE *outfile)
RESP_PREAUTH
:
RESP_OK
,
"%s"
,
text
);
io_flush
();
set_xscript_level
((
state
==
STATE_AUTH
)
?
XSCRIPT_NORMAL
:
XSCRIPT_SECURE
);
set_xscript_level
((
state
==
STATE_AUTH
)
?
MU_XSCRIPT_NORMAL
:
MU_XSCRIPT_SECURE
);
tokp
=
imap4d_tokbuf_init
();
while
(
1
)
...
...
imap4d/io.c
View file @
ab4d428
...
...
@@ -243,7 +243,7 @@ io_format_completion_response (mu_stream_t str,
if
(
new_state
!=
STATE_NONE
)
{
if
(
new_state
==
STATE_AUTH
)
set_xscript_level
(
XSCRIPT_NORMAL
);
set_xscript_level
(
MU_
XSCRIPT_NORMAL
);
state
=
new_state
;
}
...
...
@@ -574,7 +574,7 @@ imap4d_readline (struct imap4d_tokbuf *tok)
char
*
sp
=
NULL
;
char
*
buf
;
size_t
len
;
int
xlev
=
set_xscript_level
(
XSCRIPT_PAYLOAD
);
int
xlev
=
set_xscript_level
(
MU_
XSCRIPT_PAYLOAD
);
number
=
strtoul
(
last_arg
+
1
,
&
sp
,
10
);
/* Client can ask for non-synchronised literal,
...
...
imap4d/uid.c
View file @
ab4d428
...
...
@@ -38,7 +38,7 @@ imap4d_uid (struct imap4d_command *command, imap4d_tokbuf_t tok)
if
(
mu_c_strcasecmp
(
cmd
,
"FETCH"
)
==
0
)
{
int
xlev
=
set_xscript_level
(
XSCRIPT_PAYLOAD
);
int
xlev
=
set_xscript_level
(
MU_
XSCRIPT_PAYLOAD
);
rc
=
imap4d_fetch0
(
tok
,
1
,
&
err_text
);
set_xscript_level
(
xlev
);
}
...
...
imap4d/util.c
View file @
ab4d428
...
...
@@ -677,13 +677,13 @@ set_xscript_level (int xlev)
{
if
(
imap4d_transcript
)
{
if
(
xlev
!=
XSCRIPT_NORMAL
)
if
(
xlev
!=
MU_
XSCRIPT_NORMAL
)
{
mu_log_level_t
n
=
xlev
==
XSCRIPT_SECURE
?
mu_log_level_t
n
=
xlev
==
MU_
XSCRIPT_SECURE
?
MU_DEBUG_TRACE6
:
MU_DEBUG_TRACE7
;
if
(
mu_global_debug_level
(
"imap4"
)
&
MU_DEBUG_LEVEL_MASK
(
n
))
return
XSCRIPT_NORMAL
;
return
MU_
XSCRIPT_NORMAL
;
}
if
(
mu_stream_ioctl
(
iostream
,
MU_IOCTL_LEVEL
,
&
xlev
)
==
0
)
...
...
include/mailutils/stream.h
View file @
ab4d428
...
...
@@ -157,9 +157,9 @@ int mu_tcp_stream_create (mu_stream_t *stream, const char *host, int port,
int
flags
);
/* Transcript output levels */
#define XSCRIPT_NORMAL 0
/* Normal transcript */
#define
XSCRIPT_SECURE 1
/* Security-related data are being sent/receiv
ed */
#define XSCRIPT_PAYLOAD 2
/* Actual payload (may be copious) */
#define
MU_
XSCRIPT_NORMAL 0
/* Normal transcript */
#define
MU_XSCRIPT_SECURE 1
/* Security-related data are being transmitt
ed */
#define
MU_
XSCRIPT_PAYLOAD 2
/* Actual payload (may be copious) */
int
mu_xscript_stream_create
(
mu_stream_t
*
pref
,
mu_stream_t
transport
,
mu_stream_t
logstr
,
...
...
libproto/pop/mbox.c
View file @
ab4d428
...
...
@@ -162,9 +162,9 @@ pop_open (mu_mailbox_t mbox, int flags)
if
(
mu_debug_check_level
(
mbox
->
debug
,
MU_DEBUG_PROT
))
mu_pop3_trace
(
mpd
->
pop3
,
MU_POP3_TRACE_SET
);
if
(
mu_debug_check_level
(
mbox
->
debug
,
MU_DEBUG_TRACE6
))
mu_pop3_trace_mask
(
mpd
->
pop3
,
MU_POP3_TRACE_SET
,
XSCRIPT_SECURE
);
mu_pop3_trace_mask
(
mpd
->
pop3
,
MU_POP3_TRACE_SET
,
MU_
XSCRIPT_SECURE
);
if
(
mu_debug_check_level
(
mbox
->
debug
,
MU_DEBUG_TRACE7
))
mu_pop3_trace_mask
(
mpd
->
pop3
,
MU_POP3_TRACE_SET
,
XSCRIPT_PAYLOAD
);
mu_pop3_trace_mask
(
mpd
->
pop3
,
MU_POP3_TRACE_SET
,
MU_
XSCRIPT_PAYLOAD
);
do
{
...
...
libproto/pop/pop3_pass.c
View file @
ab4d428
...
...
@@ -35,10 +35,10 @@ mu_pop3_pass (mu_pop3_t pop3, const char *passwd)
switch
(
pop3
->
state
)
{
case
MU_POP3_NO_STATE
:
if
(
mu_pop3_trace_mask
(
pop3
,
MU_POP3_TRACE_QRY
,
XSCRIPT_SECURE
))
_mu_pop3_xscript_level
(
pop3
,
XSCRIPT_SECURE
);
if
(
mu_pop3_trace_mask
(
pop3
,
MU_POP3_TRACE_QRY
,
MU_
XSCRIPT_SECURE
))
_mu_pop3_xscript_level
(
pop3
,
MU_
XSCRIPT_SECURE
);
status
=
mu_pop3_writeline
(
pop3
,
"PASS %s
\r\n
"
,
passwd
);
_mu_pop3_xscript_level
(
pop3
,
XSCRIPT_NORMAL
);
_mu_pop3_xscript_level
(
pop3
,
MU_
XSCRIPT_NORMAL
);
MU_POP3_CHECK_ERROR
(
pop3
,
status
);
/* FIXME: how to obscure the passwd in the stream buffer? */
MU_POP3_FCLR
(
pop3
,
MU_POP3_ACK
);
...
...
libproto/pop/pop3_retr.c
View file @
ab4d428
...
...
@@ -50,8 +50,8 @@ mu_pop3_retr (mu_pop3_t pop3, unsigned int msgno, mu_stream_t *pstream)
MU_POP3_CHECK_OK
(
pop3
);
status
=
mu_pop3_stream_create
(
pop3
,
pstream
);
MU_POP3_CHECK_ERROR
(
pop3
,
status
);
if
(
mu_pop3_trace_mask
(
pop3
,
MU_POP3_TRACE_QRY
,
XSCRIPT_PAYLOAD
))
_mu_pop3_xscript_level
(
pop3
,
XSCRIPT_PAYLOAD
);
if
(
mu_pop3_trace_mask
(
pop3
,
MU_POP3_TRACE_QRY
,
MU_
XSCRIPT_PAYLOAD
))
_mu_pop3_xscript_level
(
pop3
,
MU_
XSCRIPT_PAYLOAD
);
pop3
->
state
=
MU_POP3_RETR_RX
;
case
MU_POP3_RETR_RX
:
...
...
libproto/pop/pop3_stream.c
View file @
ab4d428
...
...
@@ -185,7 +185,7 @@ _pop3_event_cb (mu_stream_t str, int ev, int flags)
if
(
mu_stream_ioctl
(
str
,
MU_IOCTL_GET_TRANSPORT
,
trans
)
==
0
)
{
struct
mu_pop3_stream
*
sp
=
(
struct
mu_pop3_stream
*
)
trans
[
0
];
_mu_pop3_xscript_level
(
sp
->
pop3
,
XSCRIPT_NORMAL
);
_mu_pop3_xscript_level
(
sp
->
pop3
,
MU_
XSCRIPT_NORMAL
);
sp
->
pop3
->
state
=
MU_POP3_NO_STATE
;
}
}
...
...
libproto/pop/pop3_top.c
View file @
ab4d428
...
...
@@ -50,8 +50,8 @@ mu_pop3_top (mu_pop3_t pop3, unsigned msgno, unsigned int lines,
MU_POP3_CHECK_OK
(
pop3
);
status
=
mu_pop3_stream_create
(
pop3
,
pstream
);
MU_POP3_CHECK_ERROR
(
pop3
,
status
);
if
(
mu_pop3_trace_mask
(
pop3
,
MU_POP3_TRACE_QRY
,
XSCRIPT_PAYLOAD
))
_mu_pop3_xscript_level
(
pop3
,
XSCRIPT_PAYLOAD
);
if
(
mu_pop3_trace_mask
(
pop3
,
MU_POP3_TRACE_QRY
,
MU_
XSCRIPT_PAYLOAD
))
_mu_pop3_xscript_level
(
pop3
,
MU_
XSCRIPT_PAYLOAD
);
pop3
->
state
=
MU_POP3_TOP_RX
;
case
MU_POP3_TOP_RX
:
...
...
libproto/pop/pop3_trace.c
View file @
ab4d428
...
...
@@ -144,7 +144,7 @@ _mu_pop3_xscript_level (mu_pop3_t pop3, int xlev)
{
if
(
mu_stream_ioctl
(
pop3
->
carrier
,
MU_IOCTL_LEVEL
,
&
xlev
)
==
0
)
return
xlev
;
return
XSCRIPT_NORMAL
;
return
MU_
XSCRIPT_NORMAL
;
}
...
...
mailbox/xscript-stream.c
View file @
ab4d428
...
...
@@ -107,7 +107,7 @@ print_transcript (struct _mu_xscript_stream *str, int flag,
if
(
str
->
flags
&
TRANS_DISABLED
)
return
;
if
(
str
->
level
==
XSCRIPT_PAYLOAD
)
if
(
str
->
level
==
MU_
XSCRIPT_PAYLOAD
)
{
mu_stream_printf
(
str
->
logstr
,
"(data...)
\n
"
);
str
->
flags
|=
TRANS_DISABLED
;
...
...
@@ -121,7 +121,7 @@ print_transcript (struct _mu_xscript_stream *str, int flag,
if
(
p
>
buf
&&
p
[
-
1
]
==
'\r'
)
len
--
;
if
(
str
->
level
==
XSCRIPT_SECURE
)
if
(
str
->
level
==
MU_
XSCRIPT_SECURE
)
{
size_t
i
;
...
...
pop3d/extra.c
View file @
ab4d428
...
...
@@ -344,13 +344,13 @@ set_xscript_level (int xlev)
{
if
(
pop3d_transcript
)
{
if
(
xlev
!=
XSCRIPT_NORMAL
)
if
(
xlev
!=
MU_
XSCRIPT_NORMAL
)
{
mu_log_level_t
n
=
xlev
==
XSCRIPT_SECURE
?
mu_log_level_t
n
=
xlev
==
MU_
XSCRIPT_SECURE
?
MU_DEBUG_TRACE6
:
MU_DEBUG_TRACE7
;
if
(
mu_global_debug_level
(
"pop3"
)
&
MU_DEBUG_LEVEL_MASK
(
n
))
return
XSCRIPT_NORMAL
;
return
MU_
XSCRIPT_NORMAL
;
}
if
(
mu_stream_ioctl
(
iostream
,
MU_IOCTL_LEVEL
,
&
xlev
)
==
0
)
...
...
pop3d/retr.c
View file @
ab4d428
...
...
@@ -47,7 +47,7 @@ pop3d_retr (char *arg)
return
ERR_UNKNOWN
;
pop3d_outf
(
"+OK
\n
"
);
xscript_level
=
set_xscript_level
(
XSCRIPT_PAYLOAD
);
xscript_level
=
set_xscript_level
(
MU_
XSCRIPT_PAYLOAD
);
mu_stream_copy
(
iostream
,
stream
,
0
,
NULL
);
mu_stream_destroy
(
&
stream
);
...
...
pop3d/top.c
View file @
ab4d428
...
...
@@ -63,7 +63,7 @@ pop3d_top (char *arg)
return
ERR_UNKNOWN
;
pop3d_outf
(
"+OK
\n
"
);
xscript_level
=
set_xscript_level
(
XSCRIPT_PAYLOAD
);
xscript_level
=
set_xscript_level
(
MU_
XSCRIPT_PAYLOAD
);
mu_stream_copy
(
iostream
,
stream
,
0
,
NULL
);
pop3d_outf
(
"
\n
"
);
...
...
pop3d/user.c
View file @
ab4d428
...
...
@@ -102,7 +102,7 @@ pop3d_user (char *arg)
pop3d_outf
(
"+OK
\n
"
);
pop3d_flush_output
();
xscript_level
=
set_xscript_level
(
XSCRIPT_SECURE
);
xscript_level
=
set_xscript_level
(
MU_
XSCRIPT_SECURE
);
buf
=
pop3d_readline
(
buffer
,
sizeof
(
buffer
));
pop3d_parse_command
(
buf
,
&
cmd
,
&
pass
);
set_xscript_level
(
xscript_level
);
...
...
Please
register
or
sign in
to post a comment