From 24ce71261b30dd202cf8b3e12a129b30a730bf9e Mon Sep 17 00:00:00 2001 From: Jan-Piet Mens Date: Tue, 10 Nov 2015 09:21:07 +0100 Subject: [PATCH] add timeout to geo decoder --- geo.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/geo.c b/geo.c index 7e8c560..9819982 100644 --- a/geo.c +++ b/geo.c @@ -167,6 +167,8 @@ JsonNode *revgeo(double lat, double lon, UT_string *addr, UT_string *cc) curl_easy_setopt(curl, CURLOPT_URL, UB(url)); curl_easy_setopt(curl, CURLOPT_USERAGENT, "OwnTracks-Recorder/1.0"); curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); + curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1L); + curl_easy_setopt(curl, CURLOPT_TIMEOUT_MS, 2000L); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, writemem); curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void *)cbuf);