- XML_ParserFree(xp);
- return;
- }
-
-retry: CtdlLogPrintf(CTDL_NOTICE, "Connecting to <%s>\n", rsshost);
- sprintf(buf, "%d", rssport);
- sock = sock_connect(rsshost, buf, "tcp");
- if (sock >= 0) {
- CtdlLogPrintf(CTDL_DEBUG, "Connected!\n");
-
- if (CtdlThreadCheckStop())
- goto shutdown ;
-
- snprintf(buf, sizeof buf, "GET %s HTTP/1.0", rssurl);
- CtdlLogPrintf(CTDL_DEBUG, "<%s\n", buf);
- sock_puts(sock, buf);
-
- if (CtdlThreadCheckStop())
- goto shutdown ;
-
- snprintf(buf, sizeof buf, "Host: %s", rsshost);
- CtdlLogPrintf(CTDL_DEBUG, "<%s\n", buf);
- sock_puts(sock, buf);
-
- if (CtdlThreadCheckStop())
- goto shutdown ;
-
- snprintf(buf, sizeof buf, "User-Agent: %s", CITADEL);
- CtdlLogPrintf(CTDL_DEBUG, "<%s\n", buf);
- sock_puts(sock, buf);
-
- if (CtdlThreadCheckStop())
- goto shutdown ;
-
- snprintf(buf, sizeof buf, "Accept: */*");
- CtdlLogPrintf(CTDL_DEBUG, "<%s\n", buf);
- sock_puts(sock, buf);
-
- if (CtdlThreadCheckStop())
- goto shutdown ;
-
- sock_puts(sock, "");
-
- if (CtdlThreadCheckStop())
- goto shutdown ;
-
- if (sock_getln(sock, buf, sizeof buf) >= 0) {
- CtdlLogPrintf(CTDL_DEBUG, ">%s\n", buf);
- remove_token(buf, 0, ' ');
-
- /* 200 OK */
- if (buf[0] == '2') {
-
- while (got_bytes = sock_getln(sock, buf, sizeof buf),
- (got_bytes >= 0 && (strcmp(buf, "")) && (strcmp(buf, "\r"))) ) {
- if (CtdlThreadCheckStop())
- goto shutdown ;
- /* discard headers */
- }
-
- while (got_bytes = sock_read(sock, buf, sizeof buf, 0),
- ((got_bytes>=0) && (ri.done_parsing == 0)) ) {
- if (CtdlThreadCheckStop())
- goto shutdown ;
- XML_Parse(xp, buf, got_bytes, 0);
- }
- if (ri.done_parsing == 0) XML_Parse(xp, "", 0, 1);
- }
+ FreeStrBuf(&rncptr->Item->guid);
+ FreeStrBuf(&rncptr->Item->title);
+ FreeStrBuf(&rncptr->Item->link);
+ FreeStrBuf(&rncptr->Item->linkTitle);
+ FreeStrBuf(&rncptr->Item->reLink);
+ FreeStrBuf(&rncptr->Item->reLinkTitle);
+ FreeStrBuf(&rncptr->Item->description);
+ FreeStrBuf(&rncptr->Item->channel_title);
+ FreeStrBuf(&rncptr->Item->author_or_creator);
+ FreeStrBuf(&rncptr->Item->author_url);
+ FreeStrBuf(&rncptr->Item->author_email);
+
+ free(rncptr->Item);
+ }
+ free(rncptr);
+}