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

pigeonhole at rename-it.nl pigeonhole at rename-it.nl
Thu Dec 31 20:56:30 EET 2009


details:   http://hg.rename-it.nl/dovecot-2.0-sieve/rev/49de5457474d
changeset: 1162:49de5457474d
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 b63b2efa57f8 -r 49de5457474d 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 b63b2efa57f8 -r 49de5457474d 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