dovecot-2.2-pigeonhole: lib-sieve: Fixed indenting problem in ru...

pigeonhole at rename-it.nl pigeonhole at rename-it.nl
Wed May 7 18:15:44 UTC 2014


details:   http://hg.rename-it.nl/dovecot-2.2-pigeonhole/rev/24cc301db1b3
changeset: 1853:24cc301db1b3
user:      Stephan Bosch <stephan at rename-it.nl>
date:      Wed May 07 20:15:07 2014 +0200
description:
lib-sieve: Fixed indenting problem in runtime trace output.
Also cleaned up the surrounding code a bit.

diffstat:

 src/lib-sieve/sieve-interpreter.c |  21 ++++++++++++---------
 src/lib-sieve/sieve-interpreter.h |   2 +-
 2 files changed, 13 insertions(+), 10 deletions(-)

diffs (54 lines):

diff -r 3476d8bc0dc3 -r 24cc301db1b3 src/lib-sieve/sieve-interpreter.c
--- a/src/lib-sieve/sieve-interpreter.c	Wed May 07 20:03:10 2014 +0200
+++ b/src/lib-sieve/sieve-interpreter.c	Wed May 07 20:15:07 2014 +0200
@@ -220,26 +220,29 @@
 			ehandler, flags);
 }
 
-void sieve_interpreter_free(struct sieve_interpreter **interp)
+void sieve_interpreter_free(struct sieve_interpreter **_interp)
 {
+	struct sieve_interpreter *interp = *_interp;
+	struct sieve_runtime_env *renv = &interp->runenv;
 	const struct sieve_interpreter_extension_reg *eregs;
 	unsigned int ext_count, i;
 
-	sieve_runtime_trace_end(&((*interp)->runenv));
+	interp->trace.indent = 0;
+	sieve_runtime_trace_end(renv);
 
 	/* Signal registered extensions that the interpreter is being destroyed */
-	eregs = array_get(&(*interp)->extensions, &ext_count);
+	eregs = array_get(&interp->extensions, &ext_count);
 	for ( i = 0; i < ext_count; i++ ) {
 		if ( eregs[i].intext != NULL && eregs[i].intext->free != NULL )
-			eregs[i].intext->free(eregs[i].ext, *interp, eregs[i].context);
+			eregs[i].intext->free(eregs[i].ext, interp, eregs[i].context);
 	}
 
-	sieve_binary_debug_reader_deinit(&(*interp)->dreader);
-	sieve_binary_unref(&(*interp)->runenv.sbin);
-	sieve_error_handler_unref(&(*interp)->runenv.ehandler);
+	sieve_binary_debug_reader_deinit(&interp->dreader);
+	sieve_binary_unref(&renv->sbin);
+	sieve_error_handler_unref(&renv->ehandler);
 
-	pool_unref(&((*interp)->pool));
-	*interp = NULL;
+	pool_unref(&interp->pool);
+	*_interp = NULL;
 }
 
 /*
diff -r 3476d8bc0dc3 -r 24cc301db1b3 src/lib-sieve/sieve-interpreter.h
--- a/src/lib-sieve/sieve-interpreter.h	Wed May 07 20:03:10 2014 +0200
+++ b/src/lib-sieve/sieve-interpreter.h	Wed May 07 20:15:07 2014 +0200
@@ -25,7 +25,7 @@
 		const struct sieve_message_data *msgdata,
 		const struct sieve_script_env *senv, struct sieve_error_handler *ehandler,
 		enum sieve_runtime_flags flags);
-void sieve_interpreter_free(struct sieve_interpreter **interp);
+void sieve_interpreter_free(struct sieve_interpreter **_interp);
 
 /*
  * Accessors


More information about the dovecot-cvs mailing list