1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-17 10:35:10 +00:00

eve: address apparently spurious libcurl recv errors (#372)

Some time after the last eve-related PR libcurl began returning
`CURLE_RECV_ERROR` from `curl_easy_perform()`, even when the request returns
good data that is otherwise usable.

Now, if the `struct xmlData` has been populated by write_data, we use whatever
came back (almost invariably a complete XML response). We don't depend on
libcurl returning CURLE_OK.
This commit is contained in:
bzy-xyz 2018-01-19 09:08:03 -05:00 committed by Brenden Matthews
parent 0e82422132
commit cb089b3231

View File

@ -186,7 +186,9 @@ static char *getXmlFromAPI(const char *apiKeyID, const char *apiVCode, const cha
curl_easy_setopt(curl_handle, CURLOPT_URL, real_url.c_str()); curl_easy_setopt(curl_handle, CURLOPT_URL, real_url.c_str());
if ((rc = curl_easy_perform(curl_handle)) != CURLE_OK) { rc = curl_easy_perform(curl_handle);
if (chr.data == NULL) {
return NULL; return NULL;
} }