cURL: put error description into the status message.
authorWilfried Goesgens <dothebart@citadel.org>
Sat, 15 Jun 2013 13:00:14 +0000 (15:00 +0200)
committerWilfried Goesgens <dothebart@citadel.org>
Sat, 15 Jun 2013 13:00:14 +0000 (15:00 +0200)
citadel/event_client.h
citadel/modules/eventclient/serv_eventclient.c
citadel/modules/rssclient/serv_rssclient.c

index b136c2e670a975d1516398c235fe18c347d82967..99d4259f65b3c377bf9f1803102f82c28b13c72e 100644 (file)
@@ -124,6 +124,7 @@ typedef struct _evcurl_request_data
        CURL                    *chnd;
        struct curl_slist       *headers;
        char                     errdesc[CURL_ERROR_SIZE];
+       const char              *CurlError;
 
        int                      attached;
 
index d0951eea8949352f83938672c83802694ed2a776..79b0eeb303d15dbba8bb2e6c17572574b8f9d308 100644 (file)
@@ -161,9 +161,10 @@ gotstatus(int nnrun)
                                EVCURL_syslog(LOG_ERR,
                                              "error description: %s\n",
                                              IO->HttpReq.errdesc);
+                               IO->HttpReq.CurlError = curl_easy_strerror(sta);
                                EVCURL_syslog(LOG_ERR,
                                              "error performing request: %s\n",
-                                             curl_easy_strerror(sta));
+                                             IO->HttpReq.CurlError);
                                if (sta == CURLE_OPERATION_TIMEDOUT)
                                {
                                        IO->SendBuf.fd = 0;
index fffe6d8e1f81201642bae63af3c8da55212a1cd9..f9e2a312afe273e7a137c850cac798cc81bc9eba 100644 (file)
@@ -515,14 +515,23 @@ eNextState RSSAggregator_AnalyseReply(AsyncIO *IO)
 
                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,
-                            ChrPtr(IO->HttpReq.ReplyData));
+                            IO->HttpReq.errdesc,
+                            IO->HttpReq.CurlError,
+                            ChrPtr(IO->HttpReq.ReplyData)
+                       );
+
                CtdlAideFPMessage(
                        ChrPtr(ErrMsg),
                        "RSS Aggregation run failure",