]> code.citadel.org Git - citadel.git/commitdiff
serv_managesieve.c is now only built on Citadel servers that
authorArt Cancro <ajc@citadel.org>
Sat, 14 Oct 2006 03:32:38 +0000 (03:32 +0000)
committerArt Cancro <ajc@citadel.org>
Sat, 14 Oct 2006 03:32:38 +0000 (03:32 +0000)
have access to libSieve, otherwise a stub function is installed.
serv_sieve.h is also now included in serv_managesieve.c, which will
give serv_managesieve access to the msiv_* API functions.

citadel/serv_managesieve.c
citadel/serv_sieve.h

index f39965413e644981ab91204318fde68d8915951f..4ff953ec9af7aa87a9daf23a9339ba34a877c073 100644 (file)
@@ -68,6 +68,9 @@
 #include "snprintf.h"
 #endif
 
+#ifdef HAVE_LIBSIEVE
+
+#include "serv_sieve.h"
 
 
 /**
@@ -565,3 +568,13 @@ char *serv_managesieve_init(void)
        CtdlRegisterSessionHook(mgsve_create_room, EVT_LOGIN);
        return "$Id: serv_managesieve.c 4570 2006-08-27 02:07:18Z dothebart $";
 }
+
+#else  /* HAVE_LIBSIEVE */
+
+char *serv_managesieve_init(void)
+{
+       lprintf(CTDL_INFO, "This server is missing libsieve.  Managesieve protocol is disabled..\n");
+       return "$Id:  $";
+}
+
+#endif /* HAVE_LIBSIEVE */
index 92060a076d216d74e6496f3f28c0c1ea6fa11b0f..b58f2c72b4dd25006737b776312589de48583def 100644 (file)
@@ -32,7 +32,6 @@ struct ctdl_sieve {
        struct sdm_userdata *u;         /* Info related to the current session */
 };
 
-#endif /* HAVE_LIBSIEVE */
 
 /* If you change this string you will break all of your Sieve configs. */
 #define CTDLSIEVECONFIGSEPARATOR       "\n-=<CtdlSieveConfigSeparator>=-\n"
@@ -49,3 +48,4 @@ char *msiv_getscript(struct sdm_userdata *u, char *script_name);
 int msiv_deletescript(struct sdm_userdata *u, char *script_name);
 void msiv_putscript(struct sdm_userdata *u, char *script_name, char *script_content);
 
+#endif /* HAVE_LIBSIEVE */