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
3165fd89
...
3165fd89c71382ecc8edd0d54fac47f23377dd67
authored
2003-10-08 02:04:44 +0000
by
Alain Magloire
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Use of mu_debug_t object scheme instead of reinventing the wheel.
1 parent
508bfd59
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
mailbox/pop/pop3_debug.c
mailbox/pop/pop3_debug.c
View file @
3165fd8
...
...
@@ -24,12 +24,13 @@
#include <mailutils/sys/pop3.h>
int
mu_pop3_set_debug
(
mu_pop3_t
pop3
,
void
(
*
print
)(
const
char
*
buffer
)
)
mu_pop3_set_debug
(
mu_pop3_t
pop3
,
mu_debug_t
debug
)
{
if
(
pop3
==
NULL
)
return
EINVAL
;
pop3
->
debug
=
print
;
if
(
pop3
->
debug
)
mu_debug_destroy
(
&
pop3
->
debug
,
NULL
);
pop3
->
debug
=
debug
;
return
0
;
}
...
...
@@ -37,7 +38,7 @@ int
mu_pop3_debug_cmd
(
mu_pop3_t
pop3
)
{
if
(
pop3
->
debug
)
pop3
->
debug
(
pop3
->
io
.
buf
);
mu_debug_print
(
pop3
->
debug
,
MU_DEBUG_PROT
,
"%s"
,
pop3
->
io
.
buf
);
return
0
;
}
...
...
@@ -46,8 +47,7 @@ mu_pop3_debug_ack (mu_pop3_t pop3)
{
if
(
pop3
->
debug
)
{
pop3
->
debug
(
pop3
->
ack
.
buf
);
pop3
->
debug
(
"
\n
"
);
mu_debug_print
(
pop3
->
debug
,
MU_DEBUG_PROT
,
"%s
\n
"
,
pop3
->
ack
.
buf
);
}
return
0
;
}
...
...
Please
register
or
sign in
to post a comment