SMTP-Client: move the client-shutdown procedure into the DB-Thread; we musn't block...
[citadel.git] / citadel / modules / extnotify / funambol65.c
index bff95fbb49fc0c7b399e47303ab6f801e38603d3..f4b0d8d38fc9b8943de839e903e1d08e9773c2bf 100644 (file)
@@ -1,7 +1,7 @@
-/* 
+/*
  * funambol65.c
  * Author: Mathew McBride
- * 
+ *
  * This module facilitates notifications to a Funambol server
  * for push email
  *
  *
  * Copyright (c) 2008-2010
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
+ * This program is open source software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3.
+ * 
+ * 
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ * 
+ * 
+ * 
  */
 
 #include <stdio.h>
@@ -49,6 +49,7 @@
 
 eNextState EvaluateResult(AsyncIO *IO);
 eNextState ExtNotifyTerminate(AsyncIO *IO);
+eNextState ExtNotifyTerminateDB(AsyncIO *IO);
 eNextState ExtNotifyShutdownAbort(AsyncIO *IO);
 
 /*
@@ -81,6 +82,7 @@ int notify_http_server(char *remoteurl,
                               "Citadel ExtNotify",
                               EvaluateResult,
                               ExtNotifyTerminate,
+                              ExtNotifyTerminateDB,
                               ExtNotifyShutdownAbort))
        {
                syslog(LOG_ALERT, "Unable to initialize libcurl.\n");
@@ -295,6 +297,11 @@ eNextState EvaluateResult(AsyncIO *IO)
        return 0;
 }
 
+eNextState ExtNotifyTerminateDB(AsyncIO *IO)
+{
+       free(IO);
+       return eAbort;
+}
 eNextState ExtNotifyTerminate(AsyncIO *IO)
 {
        free(IO);