-
-
-/*
- sprintf(port, "%d", config.c_funambol_port);
- sock = sock_connect(config.c_funambol_host, port, "tcp");
- if (sock >= 0)
- CtdlLogPrintf(CTDL_DEBUG, "Connected to Funambol!\n");
- else {
- char buf[SIZ];
-
- snprintf(buf, SIZ,
- "Unable to connect to %s:%d [%s]; won't send notification\r\n",
- config.c_funambol_host,
- config.c_funambol_port,
- strerror(errno));
- CtdlLogPrintf(CTDL_ERR, buf);
-
- aide_message(buf, "External notifier unable to connect remote host!");
- goto bail;
- }
-*/
-// if (funambolCreds != NULL) free(funambolCreds);
- //if (SOAPHeader != NULL) free(SOAPHeader);
- ///close(sock);
-
- /* Build the HTTP request header */
-
-
-/*
- sprintf(SOAPHeader, "POST %s HTTP/1.0\r\nContent-type: text/xml; charset=utf-8\r\n",
- FUNAMBOL_WS);
- strcat(SOAPHeader,"Accept: application/soap+xml, application/dime, multipart/related, text/*\r\n");
- sprintf(buf, "User-Agent: %s/%d\r\nHost: %s:%d\r\nCache-control: no-cache\r\n",
- "Citadel",
- REV_LEVEL,
- config.c_funambol_host,
- config.c_funambol_port
- );
- strcat(SOAPHeader,buf);
- strcat(SOAPHeader,"Pragma: no-cache\r\nSOAPAction: \"\"\r\n");
- sprintf(buf, "Content-Length: %d \r\n",
- strlen(SOAPMessage));
- strcat(SOAPHeader, buf);
-*/
-
-/* funambolCreds = malloc(strlen(config.c_funambol_auth)*2);
- memset(funambolCreds, 0, strlen(config.c_funambol_auth)*2);
- CtdlEncodeBase64(funambolCreds, config.c_funambol_auth, strlen(config.c_funambol_auth), 0);
- sprintf(buf, "Authorization: Basic %s\r\n\r\n",
- funambolCreds);
- strcat(SOAPHeader, buf);
-
- sock_write(sock, SOAPHeader, strlen(SOAPHeader));
- sock_write(sock, SOAPMessage, strlen(SOAPMessage));
- sock_shutdown(sock, SHUT_WR);
-
- / * Response * /
- CtdlLogPrintf(CTDL_DEBUG, "Awaiting response\n");
- if (sock_getln(sock, buf, SIZ) < 0) {
- goto free;
- }
- CtdlLogPrintf(CTDL_DEBUG, "<%s\n", buf);
- if (strncasecmp(buf, "HTTP/1.1 200 OK", strlen("HTTP/1.1 200 OK"))) {
-
- goto free;
- }
-*/