Skip to content
Snippets Groups Projects
Commit c2edac3b authored by Stephan Bosch's avatar Stephan Bosch
Browse files

lib-sieve: script: Added more debug output about metadata up-to-date status.

parent fb9f1f0e
No related branches found
No related tags found
No related merge requests found
......@@ -338,6 +338,7 @@ int sieve_script_binary_read_metadata
{
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 @@ int sieve_script_binary_read_metadata
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 @@ int sieve_script_binary_read_metadata
sieve_binary_path(sbin), sieve_script_location(script));
return -1;
}
if ( script->location == NULL )
return 0;
if ( strcmp(str_c(location), script->location) != 0 )
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 ( script->v.binary_read_metadata == NULL )
return 1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment

Consent

On this website, we use the web analytics service Matomo to analyze and review the use of our website. Through the collected statistics, we can improve our offerings and make them more appealing for you. Here, you can decide whether to allow us to process your data and set corresponding cookies for these purposes, in addition to technically necessary cookies. Further information on data protection—especially regarding "cookies" and "Matomo"—can be found in our privacy policy. You can withdraw your consent at any time.