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
ee1b4a53
...
ee1b4a5301e6219462aca51d989532f2217a6ab7
authored
2004-01-05 13:55:44 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Improved debugging messages
1 parent
b28a03bf
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
46 additions
and
10 deletions
examples/numaddr.c
libsieve/extensions/list.c
libsieve/extensions/spamd.c
libsieve/extensions/timestamp.c
libsieve/tests.c
examples/numaddr.c
View file @
ee1b4a5
...
...
@@ -84,7 +84,13 @@ numaddr_test (sieve_machine_t mach, list_t args, list_t tags)
int
rc
;
if
(
sieve_get_debug_level
(
mach
)
&
MU_SIEVE_DEBUG_TRACE
)
sieve_debug
(
mach
,
"NUMADDR
\n
"
);
{
sieve_locus_t
locus
;
sieve_get_locus
(
mach
,
&
locus
);
sieve_debug
(
mach
,
"%s:%lu: NUMADDR
\n
"
,
locus
.
source_file
,
(
unsigned
long
)
locus
.
source_line
);
}
/* Retrieve required arguments: */
/* First argument: list of header names */
...
...
libsieve/extensions/list.c
View file @
ee1b4a5
...
...
@@ -133,6 +133,15 @@ list_test (sieve_machine_t mach, list_t args, list_t tags)
struct
header_closure
clos
;
int
result
;
if
(
sieve_get_debug_level
(
mach
)
&
MU_SIEVE_DEBUG_TRACE
)
{
sieve_locus_t
locus
;
sieve_get_locus
(
mach
,
&
locus
);
sieve_debug
(
mach
,
"%s:%lu: LIST
\n
"
,
locus
.
source_file
,
(
unsigned
long
)
locus
.
source_line
);
}
memset
(
&
clos
,
0
,
sizeof
clos
);
if
(
sieve_tag_lookup
(
tags
,
"delim"
,
&
arg
))
clos
.
delim
=
arg
->
v
.
string
;
...
...
libsieve/extensions/spamd.c
View file @
ee1b4a5
...
...
@@ -294,8 +294,14 @@ spamd_test (sieve_machine_t mach, list_t args, list_t tags)
header_t
hdr
;
if
(
sieve_get_debug_level
(
mach
)
&
MU_SIEVE_DEBUG_TRACE
)
sieve_debug
(
mach
,
"spamd_test %lu
\n
"
,
(
u_long
)
sieve_get_message_num
(
mach
));
{
sieve_locus_t
locus
;
sieve_get_locus
(
mach
,
&
locus
);
sieve_debug
(
mach
,
"%s:%lu: spamd_test %lu
\n
"
,
locus
.
source_file
,
(
unsigned
long
)
locus
.
source_line
,
(
u_long
)
sieve_get_message_num
(
mach
));
}
if
(
sieve_tag_lookup
(
tags
,
"host"
,
&
arg
))
host
=
arg
->
v
.
string
;
...
...
libsieve/extensions/timestamp.c
View file @
ee1b4a5
...
...
@@ -57,7 +57,13 @@ timestamp_test (sieve_machine_t mach, list_t args, list_t tags)
int
rc
;
if
(
sieve_get_debug_level
(
mach
)
&
MU_SIEVE_DEBUG_TRACE
)
sieve_debug
(
mach
,
"TIMESTAMP
\n
"
);
{
sieve_locus_t
locus
;
sieve_get_locus
(
mach
,
&
locus
);
sieve_debug
(
mach
,
"%s:%lu: TIMESTAMP
\n
"
,
locus
.
source_file
,
(
unsigned
long
)
locus
.
source_line
);
}
/* Retrieve required arguments: */
/* First argument: header name */
...
...
libsieve/tests.c
View file @
ee1b4a5
...
...
@@ -119,7 +119,9 @@ sieve_test_address (sieve_machine_t mach, list_t args, list_t tags)
size_t
count
;
if
(
mach
->
debug_level
&
MU_SIEVE_DEBUG_TRACE
)
sieve_debug
(
mach
,
"ADDRESS
\n
"
);
sieve_debug
(
mach
,
"%s:%lu: ADDRESS
\n
"
,
mach
->
locus
.
source_file
,
(
unsigned
long
)
mach
->
locus
.
source_line
);
h
=
sieve_value_get
(
args
,
0
);
if
(
!
h
)
...
...
@@ -183,7 +185,9 @@ sieve_test_header (sieve_machine_t mach, list_t args, list_t tags)
struct
header_closure
clos
;
if
(
mach
->
debug_level
&
MU_SIEVE_DEBUG_TRACE
)
sieve_debug
(
mach
,
"HEADER
\n
"
);
sieve_debug
(
mach
,
"%s:%lu: HEADER
\n
"
,
mach
->
locus
.
source_file
,
(
unsigned
long
)
mach
->
locus
.
source_line
);
h
=
sieve_value_get
(
args
,
0
);
if
(
!
h
)
...
...
@@ -268,7 +272,9 @@ sieve_test_envelope (sieve_machine_t mach, list_t args, list_t tags)
size_t
count
;
if
(
mach
->
debug_level
&
MU_SIEVE_DEBUG_TRACE
)
sieve_debug
(
mach
,
"HEADER
\n
"
);
sieve_debug
(
mach
,
"%s:%lu: ENVELOPE
\n
"
,
mach
->
locus
.
source_file
,
(
unsigned
long
)
mach
->
locus
.
source_line
);
h
=
sieve_value_get
(
args
,
0
);
if
(
!
h
)
...
...
@@ -322,7 +328,8 @@ int
sieve_test_true
(
sieve_machine_t
mach
,
list_t
args
,
list_t
tags
)
{
if
(
mach
->
debug_level
&
MU_SIEVE_DEBUG_TRACE
)
sieve_debug
(
mach
,
"TRUE
\n
"
);
sieve_debug
(
mach
,
"%s:%lu: TRUE
\n
"
,
mach
->
locus
.
source_file
,
(
unsigned
long
)
mach
->
locus
.
source_line
);
return
1
;
}
...
...
@@ -330,7 +337,8 @@ int
sieve_test_false
(
sieve_machine_t
mach
,
list_t
args
,
list_t
tags
)
{
if
(
mach
->
debug_level
&
MU_SIEVE_DEBUG_TRACE
)
sieve_debug
(
mach
,
"FALSE
\n
"
);
sieve_debug
(
mach
,
"%s:%lu: FALSE
\n
"
,
mach
->
locus
.
source_file
,
(
unsigned
long
)
mach
->
locus
.
source_line
);
return
0
;
}
...
...
@@ -350,7 +358,8 @@ sieve_test_exists (sieve_machine_t mach, list_t args, list_t tags)
sieve_value_t
*
val
;
if
(
mach
->
debug_level
&
MU_SIEVE_DEBUG_TRACE
)
sieve_debug
(
mach
,
"EXISTS
\n
"
);
sieve_debug
(
mach
,
"%s:%lu: EXISTS
\n
"
,
mach
->
locus
.
source_file
,
(
unsigned
long
)
mach
->
locus
.
source_line
);
message_get_header
(
sieve_get_message
(
mach
),
&
header
);
val
=
sieve_value_get
(
args
,
0
);
...
...
Please
register
or
sign in
to post a comment