From 83777bad101e030e4f9f6661f4eabbf6aabfbfc4 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 24 Oct 2019 20:05:39 +0200 Subject: input_gadgets.c: do not fail completely on ssl errors --- input_gadgets.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'input_gadgets.c') diff --git a/input_gadgets.c b/input_gadgets.c index 863baab..08b562b 100644 --- a/input_gadgets.c +++ b/input_gadgets.c @@ -173,7 +173,7 @@ char *gadgets_retrieve_current_temperature(char *output, int max_len, double *te curl_easy_strerror(res) ); free(chunk.memory); - if (res != CURLE_COULDNT_RESOLVE_HOST && res != CURLE_COULDNT_CONNECT) + if (res != CURLE_COULDNT_RESOLVE_HOST && res != CURLE_COULDNT_CONNECT && res != CURLE_PEER_FAILED_VERIFICATION) return NULL; char *ende = output; if (max_len > 0) @@ -299,7 +299,7 @@ char *gadgets_retrieve_weather_forecast(char *output, int max_len) curl_easy_strerror(res) ); free(chunk.memory); - if (res != CURLE_COULDNT_RESOLVE_HOST && res != CURLE_COULDNT_CONNECT) + if (res != CURLE_COULDNT_RESOLVE_HOST && res != CURLE_COULDNT_CONNECT && res != CURLE_PEER_FAILED_VERIFICATION) return NULL; char *ende = output; if (max_len > 0) @@ -427,7 +427,7 @@ char *gadgets_retrieve_weather_warnings(char *output, int max_len) curl_easy_strerror(res) ); free(chunk.memory); - if (res != CURLE_COULDNT_RESOLVE_HOST && res != CURLE_COULDNT_CONNECT) + if (res != CURLE_COULDNT_RESOLVE_HOST && res != CURLE_COULDNT_CONNECT && res != CURLE_PEER_FAILED_VERIFICATION) return NULL; char *ende = output; if (max_len > 0) @@ -1007,7 +1007,7 @@ char *gadgets_retrieve_humidity(char *output, int max_len, double fh_temperature curl_easy_strerror(res) ); free(chunk.memory); - if (res != CURLE_COULDNT_RESOLVE_HOST && res != CURLE_COULDNT_CONNECT) + if (res != CURLE_COULDNT_RESOLVE_HOST && res != CURLE_COULDNT_CONNECT && res != CURLE_PEER_FAILED_VERIFICATION) return NULL; if (max_len > 0) ende += snprintf(ende, max_len, "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c", 0xEE, 0x01, 0xEE, 0x02, 0xEE, 0x01, 0xEE, 0x02, 0xEE, 0x05, 0xEE, 0x06, 0xEE, 0x05, 0xEE, 0x06); -- cgit v1.2.3-54-g00ecf