]> code.citadel.org Git - citadel.git/blobdiff - citadel/serv_funambol.c
mk_module_init.sh now tests to see if echo supports -e and -E
[citadel.git] / citadel / serv_funambol.c
index 751ecda3da7a5e310320944ffcf32adc4397acac..561be098664567f7c88a7d2eb3364b23573836cd 100644 (file)
 #include <sys/socket.h>
 #include "citadel.h"
 #include "server.h"
-#include "sysdep_decls.h"
 #include "citserver.h"
 #include "support.h"
 #include "config.h"
 #include "control.h"
-#include "serv_extensions.h"
 #include "room_ops.h"
 #include "user_ops.h"
 #include "policy.h"
 #include "domain.h"
 #include "clientsocket.h"
 #include "serv_funambol.h"
+
+
+
+#include "ctdl_module.h"
+
+
 /*
  * Create the notify message queue
  */
@@ -95,17 +99,10 @@ void do_notify_queue(void) {
 /*
  * Connect to the Funambol server and scan a message.
  */
-int notify_funambol(long msgnum, void *userdata) {
+void notify_funambol(long msgnum, void *userdata) {
        struct CtdlMessage *msg;
        int sock = (-1);
-       char fnblhosts[SIZ];
-       int num_fnblhosts;
        char buf[SIZ];
-       int is_spam = 0;
-       int fnbl;
-       char *msgtext;
-       size_t msglen;
-       char host[SIZ];
        char SOAPHeader[SIZ];
        char SOAPData[SIZ];
        char port[SIZ];
@@ -128,7 +125,7 @@ int notify_funambol(long msgnum, void *userdata) {
 
        if (sock < 0) {
                /* If the service isn't running, pass for now */
-               return(0);
+               return;
        }
        
        /* Build a SOAP message, delicately, by hand */
@@ -222,14 +219,15 @@ int notify_funambol(long msgnum, void *userdata) {
        long todelete[1];
        todelete[0] = msgnum;
        CtdlDeleteMessages(FNBL_QUEUE_ROOM, todelete, 1, "");
-       return 0;
 }
 
 
 
-char *serv_funambol_init(void)
+CTDL_MODULE_INIT(funambol)
 {
        create_notify_queue();
        CtdlRegisterSessionHook(do_notify_queue, EVT_TIMER);
-        return "$Id: serv_funambol.c $";
+
+       /* return our Subversion id for the Log */
+        return "$Id$";
 }