dovecot-2.2-pigeonhole: lib-sieve: Make sure internal script sto...

pigeonhole at rename-it.nl pigeonhole at rename-it.nl
Fri Jan 16 17:26:02 UTC 2015


details:   http://hg.rename-it.nl/dovecot-2.2-pigeonhole/rev/8f73af8e6c3a
changeset: 1985:8f73af8e6c3a
user:      Stephan Bosch <stephan at rename-it.nl>
date:      Fri Jan 16 18:23:49 2015 +0100
description:
lib-sieve: Make sure internal script storage errors clear previous error.

diffstat:

 src/lib-sieve/sieve-script.c  |  4 +++-
 src/lib-sieve/sieve-storage.c |  6 +++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diffs (53 lines):

diff -r efe2a5fdcc25 -r 8f73af8e6c3a src/lib-sieve/sieve-script.c
--- a/src/lib-sieve/sieve-script.c	Thu Jan 08 02:07:51 2015 +0100
+++ b/src/lib-sieve/sieve-script.c	Fri Jan 16 18:23:49 2015 +0100
@@ -571,7 +571,6 @@
 
 	va_list va;
 
-	sieve_storage_clear_error(storage);
 	if (fmt != NULL) {
 		if ( (storage->flags & SIEVE_STORAGE_FLAG_SYNCHRONIZING) == 0 ) {
 			va_start(va, fmt);
@@ -580,7 +579,10 @@
 			va_end(va);
 
 			sieve_storage_set_internal_error(storage);
+
 		} else {
+			sieve_storage_clear_error(storage);
+
 			/* no user is involved while synchronizing, so do it the
 			   normal way */
 			va_start(va, fmt);
diff -r efe2a5fdcc25 -r 8f73af8e6c3a src/lib-sieve/sieve-storage.c
--- a/src/lib-sieve/sieve-storage.c	Thu Jan 08 02:07:51 2015 +0100
+++ b/src/lib-sieve/sieve-storage.c	Fri Jan 16 18:23:49 2015 +0100
@@ -986,6 +986,8 @@
 	struct tm *tm;
 	char str[256];
 
+	sieve_storage_clear_error(storage);
+
 	/* critical errors may contain sensitive data, so let user
 	   see only "Internal error" with a timestamp to make it
 	   easier to look from log files the actual error message. */
@@ -1003,7 +1005,6 @@
 {
 	va_list va;
 
-	sieve_storage_clear_error(storage);
 	if (fmt != NULL) {
 		if ( (storage->flags & SIEVE_STORAGE_FLAG_SYNCHRONIZING) == 0 ) {
 			va_start(va, fmt);
@@ -1012,7 +1013,10 @@
 			va_end(va);
 
 			sieve_storage_set_internal_error(storage);
+
 		} else {
+			sieve_storage_clear_error(storage);
+
 			/* no user is involved while synchronizing, so do it the
 			   normal way */
 			va_start(va, fmt);


More information about the dovecot-cvs mailing list