dovecot-2.2-pigeonhole: lib-sieve: Fixed sieve_result_global_log...
pigeonhole at rename-it.nl
pigeonhole at rename-it.nl
Fri Apr 25 21:53:53 UTC 2014
details: http://hg.rename-it.nl/dovecot-2.2-pigeonhole/rev/f5d11f8c614c
changeset: 1847:f5d11f8c614c
user: Stephan Bosch <stephan at rename-it.nl>
date: Fri Apr 25 23:53:40 2014 +0200
description:
lib-sieve: Fixed sieve_result_global_log_error to log only as i_info in administrator log (syslog) if executed from multiscript context.
Previously, this would work correcly only from the user's personal script and not from multiscript (sieve_before/sieve_after).
diffstat:
src/lib-sieve/sieve-error.c | 58 +++++++++++++++++++++++++++-----------------
1 files changed, 36 insertions(+), 22 deletions(-)
diffs (81 lines):
diff -r db8f7bbda283 -r f5d11f8c614c src/lib-sieve/sieve-error.c
--- a/src/lib-sieve/sieve-error.c Tue Apr 15 23:11:46 2014 +0200
+++ b/src/lib-sieve/sieve-error.c Fri Apr 25 23:53:40 2014 +0200
@@ -77,20 +77,27 @@
unsigned int flags, const char *location, const char *fmt, va_list args)
{
if ( (flags & SIEVE_ERROR_FLAG_GLOBAL) != 0 &&
- (ehandler == NULL || ehandler->parent == NULL) &&
- svinst->system_ehandler != ehandler &&
- svinst->system_ehandler->verror != NULL ) {
- va_list args_copy;
+ (ehandler == NULL || ehandler->parent == NULL)) {
+ if (svinst->system_ehandler != ehandler ||
+ (flags & SIEVE_ERROR_FLAG_GLOBAL_MAX_INFO) != 0) {
+ va_list args_copy;
- VA_COPY(args_copy, args);
+ VA_COPY(args_copy, args);
- if ( (flags & SIEVE_ERROR_FLAG_GLOBAL_MAX_INFO) != 0 ) {
- svinst->system_ehandler->vinfo
- (svinst->system_ehandler, 0, location, fmt, args_copy);
- } else {
- svinst->system_ehandler->verror
- (svinst->system_ehandler, 0, location, fmt, args_copy);
+ if ( (flags & SIEVE_ERROR_FLAG_GLOBAL_MAX_INFO) != 0 ) {
+ if (svinst->system_ehandler->vinfo != NULL ) {
+ svinst->system_ehandler->vinfo
+ (svinst->system_ehandler, 0, location, fmt, args_copy);
+ }
+ } else {
+ if ( svinst->system_ehandler->verror != NULL ) {
+ svinst->system_ehandler->verror
+ (svinst->system_ehandler, 0, location, fmt, args_copy);
+ }
+ }
}
+ if (svinst->system_ehandler == ehandler)
+ return;
}
if ( ehandler == NULL )
@@ -110,20 +117,27 @@
unsigned int flags, const char *location, const char *fmt, va_list args)
{
if ( (flags & SIEVE_ERROR_FLAG_GLOBAL) != 0 &&
- (ehandler == NULL || ehandler->parent == NULL) &&
- svinst->system_ehandler != ehandler &&
- svinst->system_ehandler->vwarning != NULL ) {
- va_list args_copy;
+ (ehandler == NULL || ehandler->parent == NULL)) {
+ if (svinst->system_ehandler != ehandler ||
+ (flags & SIEVE_ERROR_FLAG_GLOBAL_MAX_INFO) != 0) {
+ va_list args_copy;
- VA_COPY(args_copy, args);
+ VA_COPY(args_copy, args);
- if ( (flags & SIEVE_ERROR_FLAG_GLOBAL_MAX_INFO) != 0 ) {
- svinst->system_ehandler->vinfo
- (svinst->system_ehandler, 0, location, fmt, args_copy);
- } else {
- svinst->system_ehandler->vwarning
- (svinst->system_ehandler, 0, location, fmt, args_copy);
+ if ( (flags & SIEVE_ERROR_FLAG_GLOBAL_MAX_INFO) != 0 ) {
+ if (svinst->system_ehandler->vinfo != NULL ) {
+ svinst->system_ehandler->vinfo
+ (svinst->system_ehandler, 0, location, fmt, args_copy);
+ }
+ } else {
+ if ( svinst->system_ehandler->vwarning != NULL ) {
+ svinst->system_ehandler->vwarning
+ (svinst->system_ehandler, 0, location, fmt, args_copy);
+ }
+ }
}
+ if (svinst->system_ehandler == ehandler)
+ return;
}
if ( ehandler == NULL )
More information about the dovecot-cvs
mailing list