dovecot-2.2-pigeonhole: lib-sieve: script: Added more debug outp...
pigeonhole at rename-it.nl
pigeonhole at rename-it.nl
Wed Mar 11 22:59:59 UTC 2015
details: http://hg.rename-it.nl/dovecot-2.2-pigeonhole/rev/986ea6e9c270
changeset: 2002:986ea6e9c270
user: Stephan Bosch <stephan at rename-it.nl>
date: Wed Mar 11 23:59:51 2015 +0100
description:
lib-sieve: script: Added more debug output about metadata up-to-date status.
diffstat:
src/lib-sieve/sieve-script.c | 18 ++++++++++++++----
1 files changed, 14 insertions(+), 4 deletions(-)
diffs (44 lines):
diff -r 961c66e7f414 -r 986ea6e9c270 src/lib-sieve/sieve-script.c
--- a/src/lib-sieve/sieve-script.c Tue Mar 10 03:19:39 2015 +0100
+++ b/src/lib-sieve/sieve-script.c Wed Mar 11 23:59:51 2015 +0100
@@ -338,6 +338,7 @@
{
struct sieve_binary *sbin = sieve_binary_block_get_binary(sblock);
string_t *storage_class, *location;
+ const char *script_location;
unsigned int version;
if ( sieve_binary_block_get_size(sblock) - *offset == 0 )
@@ -351,8 +352,13 @@
sieve_binary_path(sbin), sieve_script_location(script));
return -1;
}
- if ( strcmp(str_c(storage_class), script->driver_name) != 0 )
+ if ( strcmp(str_c(storage_class), script->driver_name) != 0 ) {
+ sieve_script_sys_debug(script,
+ "Binary reports unexpected driver name "
+ "(`%s' rather than `%s')",
+ str_c(storage_class), script->driver_name);
return 0;
+ }
/* version */
if ( !sieve_binary_read_unsigned(sblock, offset, &version) ) {
@@ -379,10 +385,14 @@
sieve_binary_path(sbin), sieve_script_location(script));
return -1;
}
- if ( script->location == NULL )
+ script_location = ( script->location == NULL ? "" : script->location);
+ if ( strcmp(str_c(location), script_location) != 0 ) {
+ sieve_script_sys_debug(script,
+ "Binary reports different script location "
+ "(`%s' rather than `%s')",
+ str_c(location), script_location);
return 0;
- if ( strcmp(str_c(location), script->location) != 0 )
- return 0;
+ }
if ( script->v.binary_read_metadata == NULL )
return 1;
More information about the dovecot-cvs
mailing list