+ HashPos *it = NULL;
+ long len;
+ const char *Key;
+ pRSSConfig *pCfg;
+ u_char rawdigest[MD5_DIGEST_LEN];
+ struct MD5Context md5context;
+ StrBuf *guid;
+ rss_aggregator *Ctx = (rss_aggregator *) IO->Data;
+
+
+ if ((IO->HttpReq.httpcode >= 300) &&
+ (IO->HttpReq.httpcode < 400) &&
+ (Ctx->RedirectUrl != NULL)) {
+
+ StrBuf *ErrMsg;
+ long lens[2];
+ const char *strs[2];
+
+ SetRSSState(IO, eRSSFailure);
+ ErrMsg = NewStrBuf();
+ if (IO) EVRSSC_syslog(LOG_ALERT, "need a 200, got a %ld !\n",
+ IO->HttpReq.httpcode);
+ strs[0] = ChrPtr(Ctx->Url);
+ lens[0] = StrLength(Ctx->Url);
+
+ strs[1] = ChrPtr(Ctx->rooms);
+ lens[1] = StrLength(Ctx->rooms);
+
+ if (IO->HttpReq.CurlError == NULL)
+ IO->HttpReq.CurlError = "";
+
+ StrBufPrintf(ErrMsg,
+ "Error while RSS-Aggregation Run of %s\n"
+ " need a 200, got a %ld !\n"
+ " Curl Error message: \n%s / %s\n"
+ " Redirect header points to: %s\n"
+ " Response text was: \n"
+ " \n %s\n",
+ ChrPtr(Ctx->Url),
+ IO->HttpReq.httpcode,
+ IO->HttpReq.errdesc,
+ IO->HttpReq.CurlError,
+ ChrPtr(Ctx->RedirectUrl),
+ ChrPtr(IO->HttpReq.ReplyData)
+ );
+
+ CtdlAideFPMessage(
+ ChrPtr(ErrMsg),
+ "RSS Aggregation run failure",
+ 2, strs, (long*) &lens,
+ CCID,
+ IO->ID,
+ EvGetNow(IO));
+
+ FreeStrBuf(&ErrMsg);
+ EVRSSC_syslog(LOG_DEBUG,
+ "RSS feed returned an invalid http status code. <%s><HTTP %ld>\n",
+ ChrPtr(Ctx->Url),
+ IO->HttpReq.httpcode);
+ return eAbort;
+ }
+ else if (IO->HttpReq.httpcode != 200)
+ {
+ StrBuf *ErrMsg;
+ long lens[2];
+ const char *strs[2];
+
+ SetRSSState(IO, eRSSFailure);
+ ErrMsg = NewStrBuf();
+ if (IO) EVRSSC_syslog(LOG_ALERT, "need a 200, got a %ld !\n",
+ IO->HttpReq.httpcode);
+ strs[0] = ChrPtr(Ctx->Url);
+ lens[0] = StrLength(Ctx->Url);
+
+ strs[1] = ChrPtr(Ctx->rooms);
+ lens[1] = StrLength(Ctx->rooms);
+
+ if (IO->HttpReq.CurlError == NULL)
+ IO->HttpReq.CurlError = "";
+
+ StrBufPrintf(ErrMsg,
+ "Error while RSS-Aggregation Run of %s\n"
+ " need a 200, got a %ld !\n"
+ " Curl Error message: \n%s / %s\n"
+ " Response text was: \n"
+ " \n %s\n",
+ ChrPtr(Ctx->Url),
+ IO->HttpReq.httpcode,
+ IO->HttpReq.errdesc,
+ IO->HttpReq.CurlError,
+ ChrPtr(IO->HttpReq.ReplyData)
+ );
+
+ CtdlAideFPMessage(
+ ChrPtr(ErrMsg),
+ "RSS Aggregation run failure",
+ 2, strs, (long*) &lens,
+ CCID,
+ IO->ID,
+ EvGetNow(IO));
+
+ FreeStrBuf(&ErrMsg);
+ EVRSSC_syslog(LOG_DEBUG,
+ "RSS feed returned an invalid http status code. <%s><HTTP %ld>\n",
+ ChrPtr(Ctx->Url),
+ IO->HttpReq.httpcode);
+ return eAbort;
+ }