+ FreeStrBuf (&ReplyBuf);
+ return 1;
+}
+
+
+eNextState EvaluateResult(AsyncIO *IO)
+{
+
+ if (IO->HttpReq.httpcode != 200) {
+ StrBuf *ErrMsg;
+
+ syslog(LOG_ALERT, "libcurl error %ld: %s\n",
+ IO->HttpReq.httpcode,
+ IO->HttpReq.errdesc);
+
+ ErrMsg = NewStrBufPlain(
+ HKEY("Error sending your Notification\n"));
+ StrBufAppendPrintf(ErrMsg, "\nlibcurl error %ld: \n\t\t%s\n",
+ IO->HttpReq.httpcode,
+ IO->HttpReq.errdesc);
+
+ StrBufAppendBufPlain(ErrMsg,
+ HKEY("\nWas Trying to send: \n"),
+ 0);
+
+ StrBufAppendBufPlain(ErrMsg, IO->ConnectMe->PlainUrl, -1, 0);
+ if (IO->HttpReq.PlainPostDataLen > 0) {
+ StrBufAppendBufPlain(
+ ErrMsg,
+ HKEY("\nThe Post document was: \n"),
+ 0);
+ StrBufAppendBufPlain(ErrMsg,
+ IO->HttpReq.PlainPostData,
+ IO->HttpReq.PlainPostDataLen, 0);
+ StrBufAppendBufPlain(ErrMsg, HKEY("\n\n"), 0);
+ }
+ if (StrLength(IO->HttpReq.ReplyData) > 0) {
+ StrBufAppendBufPlain(
+ ErrMsg,
+ HKEY("\n\nThe Serverreply was: \n\n"),
+ 0);
+ StrBufAppendBuf(ErrMsg, IO->HttpReq.ReplyData, 0);
+ }
+ else
+ StrBufAppendBufPlain(
+ ErrMsg,
+ HKEY("\n\nThere was no Serverreply.\n\n"),
+ 0);
+ ///ExtNotify_PutErrorMessage(Ctx, ErrMsg);
+ CtdlAideMessage(ChrPtr(ErrMsg),
+ "External notifier: "
+ "unable to contact notification host!");
+ }
+
+ syslog(LOG_DEBUG, "Funambol notified\n");
+/*
+ while ((Ctx.NotifyHostList != NULL) && (Ctx.NotifyHostList[i] != NULL))
+ FreeStrBuf(&Ctx.NotifyHostList[i]);
+
+ if (Ctx.NotifyErrors != NULL)
+ {
+ long len;
+ const char *Key;
+ HashPos *It;
+ void *vErr;
+ StrBuf *ErrMsg;
+
+ It = GetNewHashPos(Ctx.NotifyErrors, 0);
+ while (GetNextHashPos(Ctx.NotifyErrors,
+ It, &len, &Key, &vErr) &&
+ (vErr != NULL)) {
+ ErrMsg = (StrBuf*) vErr;
+ quickie_message("Citadel", NULL, NULL,
+ AIDEROOM, ChrPtr(ErrMsg), FMT_FIXED,
+ "Failed to notify external service about inbound mail");
+ }
+
+ DeleteHashPos(&It);
+ DeleteHash(&Ctx.NotifyErrors);
+ }
+*/
+
+//// curl_slist_free_all (headers);
+/// curl_easy_cleanup(curl);
+ ///if (contenttype) free(contenttype);
+ ///if (SOAPMessage != NULL) free(SOAPMessage);
+ ///if (buf != NULL) free(buf);
+ ///FreeStrBuf (&ReplyBuf);