dovecot-1.2-sieve: Enotify extension: adjusted notify method registration API.

pigeonhole at rename-it.nl pigeonhole at rename-it.nl
Thu Dec 31 05:49:00 EET 2009


details:   http://hg.rename-it.nl/dovecot-1.2-sieve/rev/204eaac26e45
changeset: 1170:204eaac26e45
user:      Stephan Bosch <stephan at rename-it.nl>
date:      Thu Dec 31 04:40:09 2009 +0100
description:
Enotify extension: adjusted notify method registration API.

diffstat:

 src/lib-sieve/plugins/enotify/ext-enotify-common.c |  13 +++++++++----
 src/lib-sieve/plugins/enotify/sieve-ext-enotify.h  |   2 +-
 2 files changed, 10 insertions(+), 5 deletions(-)

diffs (37 lines):

diff -r 615ddc8b3e00 -r 204eaac26e45 src/lib-sieve/plugins/enotify/ext-enotify-common.c
--- a/src/lib-sieve/plugins/enotify/ext-enotify-common.c	Wed Dec 30 04:44:27 2009 +0100
+++ b/src/lib-sieve/plugins/enotify/ext-enotify-common.c	Thu Dec 31 04:40:09 2009 +0100
@@ -74,12 +74,17 @@
 }
 
 void sieve_enotify_method_register
-(struct sieve_extension *ntfy_ext, const struct sieve_enotify_method *method) 
+(struct sieve_instance *svinst, const struct sieve_enotify_method *method) 
 {
-	struct ext_enotify_context *ectx = 
-		(struct ext_enotify_context *) ntfy_ext->context;
+	const struct sieve_extension *ntfy_ext =
+		sieve_extension_get_by_name(svinst, "enotify");
 
-	ext_enotify_method_register(ectx, method);
+	if ( ntfy_ext != NULL ) {
+		struct ext_enotify_context *ectx = 
+			(struct ext_enotify_context *) ntfy_ext->context;
+
+		ext_enotify_method_register(ectx, method);
+	}
 }
 
 const struct sieve_enotify_method *ext_enotify_method_find
diff -r 615ddc8b3e00 -r 204eaac26e45 src/lib-sieve/plugins/enotify/sieve-ext-enotify.h
--- a/src/lib-sieve/plugins/enotify/sieve-ext-enotify.h	Wed Dec 30 04:44:27 2009 +0100
+++ b/src/lib-sieve/plugins/enotify/sieve-ext-enotify.h	Thu Dec 31 04:40:09 2009 +0100
@@ -87,7 +87,7 @@
 };
 
 void sieve_enotify_method_register
-(struct sieve_extension *ntfy_ext, const struct sieve_enotify_method *method); 
+(struct sieve_instance *svinst, const struct sieve_enotify_method *method); 
 
 /*
  * Notify method printing


More information about the dovecot-cvs mailing list