char *deleteme = NULL;
long len;
void *Value;
- char *Key;
+ const char *Key;
keys = NewHash(1, NULL);
if (!keys) return;
/* Go through the hash list, deleting keys we stored in it */
- HashPos = GetNewHashPos();
+ HashPos = GetNewHashPos(keys, 0);
while (GetNextHashPos(keys, HashPos, &len, &Key, &Value)!=0)
{
CtdlLogPrintf(CTDL_DEBUG, "Deleting associated OpenID <%s>\n", Value);
/* Only save the vCard if there is some useful data in it */
if (pop > 0) {
- char temp[PATH_MAX];
- FILE *fp;
char *ser;
-
- CtdlMakeTempFileName(temp, sizeof temp);
ser = vcard_serialize(v);
if (ser) {
- fp = fopen(temp, "w");
- if (fp) {
- fwrite(ser, strlen(ser), 1, fp);
- fclose(fp);
- CtdlWriteObject(USERCONFIGROOM, "text/x-vcard", temp, &CC->user, 0, 0, 0);
- unlink(temp);
- }
+ CtdlWriteObject(USERCONFIGROOM, "text/x-vcard",
+ ser, strlen(ser)+1, &CC->user, 0, 0, 0
+ );
free(ser);
}
}
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, fh_callback);
curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, errmsg);
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
+#ifdef CURLOPT_HTTP_CONTENT_DECODING
+ curl_easy_setopt(curl, CURLOPT_HTTP_CONTENT_DECODING, 1);
+ curl_easy_setopt(curl, CURLOPT_ENCODING, "");
+#endif
curl_easy_setopt(curl, CURLOPT_USERAGENT, CITADEL);
+ curl_easy_setopt(curl, CURLOPT_TIMEOUT, 180); /* die after 180 seconds */
if (!IsEmptyStr(config.c_ip_addr)) {
curl_easy_setopt(curl, CURLOPT_INTERFACE, config.c_ip_addr);
}
curl_easy_setopt(curl, CURLOPT_HTTPPOST, formpost);
curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, errmsg);
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
+#ifdef CURLOPT_HTTP_CONTENT_DECODING
+ curl_easy_setopt(curl, CURLOPT_HTTP_CONTENT_DECODING, 1);
+ curl_easy_setopt(curl, CURLOPT_ENCODING, "");
+#endif
curl_easy_setopt(curl, CURLOPT_USERAGENT, CITADEL);
+ curl_easy_setopt(curl, CURLOPT_TIMEOUT, 180); /* die after 180 seconds */
if (!IsEmptyStr(config.c_ip_addr)) {
curl_easy_setopt(curl, CURLOPT_INTERFACE, config.c_ip_addr);
}