1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-05 21:07:52 +00:00

Handle curl errors better (in weather and rss).

This commit is contained in:
Brenden Matthews 2009-07-19 15:28:19 -06:00
parent e76f0c8587
commit 80a71ea8bd
3 changed files with 3 additions and 3 deletions

View File

@ -245,4 +245,4 @@ EXTRA_DIST = \
imlib2.h
# vi:set ts=8 sw=8 noet ai nocindent syntax=automake:
# vi:set ts=4 sw=4 noet ai nocindent syntax=automake:

View File

@ -144,7 +144,7 @@ PRSS *get_rss_info(char *uri, int delay)
curl_easy_setopt(curl, CURLOPT_USERAGENT, "conky-rss/1.0");
res = curl_easy_perform(curl);
if (chunk.size) {
if (res == CURLE_OK && chunk.size) {
curdata = prss_parse_data(chunk.memory);
free(chunk.memory);
} else {

View File

@ -552,7 +552,7 @@ void fetch_weather_info(location *curloc)
curl_easy_setopt(curl, CURLOPT_USERAGENT, "conky-weather/1.0");
res = curl_easy_perform(curl);
if (chunk.size) {
if (res == CURLE_OK && chunk.size) {
timed_thread_lock(curloc->p_timed_thread);
parse_weather(&curloc->data, chunk.memory);
timed_thread_unlock(curloc->p_timed_thread);