/*
- * $Id: serv_rssclient.c 5652 2007-10-29 20:14:48Z ajc $
+ * $Id$
*
* Bring external RSS feeds into rooms.
*
if (ri->author_or_creator != NULL) {
msg->cm_fields['A'] = html_to_ascii(ri->author_or_creator,
strlen(ri->author_or_creator), 512, 0);
+ striplt(msg->cm_fields['A']);
}
else {
msg->cm_fields['A'] = strdup("rss");
msg->cm_fields['N'] = strdup(NODENAME);
if (ri->title != NULL) {
msg->cm_fields['U'] = html_to_ascii(ri->title, strlen(ri->title), 512, 0);
+ striplt(msg->cm_fields['U']);
}
msg->cm_fields['T'] = malloc(64);
snprintf(msg->cm_fields['T'], 64, "%ld", ri->pubdate);
}
if ( ((!strcasecmp(el, "author")) || (!strcasecmp(el, "creator"))) && (ri->chardata != NULL) ) {
- if (ri->author_or_creator != NULL) free(ri->title);
+ if (ri->author_or_creator != NULL) free(ri->author_or_creator);
striplt(ri->chardata);
ri->author_or_creator = strdup(ri->chardata);
}
curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, errmsg);
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
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);
}
CtdlThreadSchedule ("RSS Client", CTDLTHREAD_BIGSTACK, rssclient_scan, NULL, 0);
}
/* return our Subversion id for the Log */
- return "$Id: serv_rssclient.c 5652 2007-10-29 20:14:48Z ajc $";
+ return "$Id$";
}