dovecot-2.2-pigeonhole: LDA Sieve plugin: fixed bug in opening s...
pigeonhole at rename-it.nl
pigeonhole at rename-it.nl
Sun Mar 3 18:35:43 EET 2013
details: http://hg.rename-it.nl/dovecot-2.2-pigeonhole/rev/f43c7609497c
changeset: 1722:f43c7609497c
user: Stephan Bosch <stephan at rename-it.nl>
date: Sun Mar 03 17:35:37 2013 +0100
description:
LDA Sieve plugin: fixed bug in opening script files for multiscript.
Used sieve_script_create instead of sieve_script_create_open.
Changed plugin debug output a bit as well.
diffstat:
src/lib-sieve/sieve-script.c | 2 ++
src/plugins/lda-sieve/lda-sieve-plugin.c | 11 +++++++++--
2 files changed, 11 insertions(+), 2 deletions(-)
diffs (54 lines):
diff -r feb8fca97a0e -r f43c7609497c src/lib-sieve/sieve-script.c
--- a/src/lib-sieve/sieve-script.c Sun Mar 03 16:55:05 2013 +0100
+++ b/src/lib-sieve/sieve-script.c Sun Mar 03 17:35:37 2013 +0100
@@ -240,6 +240,7 @@
script = script_class->v.alloc();
sieve_script_init(script, svinst, script_class, data, name, ehandler);
+ script->location = p_strdup(script->pool, location);
return script;
}
@@ -268,6 +269,7 @@
return -1;
}
+ script->location = NULL;
if ( script->v.open(script, location, options, &error) < 0 ) {
if ( error_r == NULL ) {
if ( error == SIEVE_ERROR_NOT_FOUND )
diff -r feb8fca97a0e -r f43c7609497c src/plugins/lda-sieve/lda-sieve-plugin.c
--- a/src/plugins/lda-sieve/lda-sieve-plugin.c Sun Mar 03 16:55:05 2013 +0100
+++ b/src/plugins/lda-sieve/lda-sieve-plugin.c Sun Mar 03 17:35:37 2013 +0100
@@ -217,7 +217,7 @@
files = array_get(&script_files, &count);
for ( i = 0; i < count; i++ ) {
- struct sieve_script *script = sieve_script_create
+ struct sieve_script *script = sieve_script_create_open
(svinst, files[i], NULL, ehandler, &error);
if ( script == NULL ) {
@@ -529,14 +529,21 @@
/* Open */
+ if ( debug ) {
+ sieve_sys_debug
+ (svinst, "opening script %d of %d from %s", i+1, count,
+ sieve_script_location(script));
+ }
+
if ( (sbin=lda_sieve_open(srctx, script, cpflags, &error)) == NULL )
break;
/* Execute */
- if ( debug )
+ if ( debug ) {
sieve_sys_debug
(svinst, "executing script from %s", sieve_get_source(sbin));
+ }
more = sieve_multiscript_run(mscript, sbin, ehandler, rtflags, final);
More information about the dovecot-cvs
mailing list