Fix for some buggy libcurl versions (linux).

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7656 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
RandumKiwi
2013-11-10 18:54:27 +00:00
parent 75aa782616
commit 86a63fc554
2 changed files with 7 additions and 4 deletions
+3 -2
View File
@@ -1312,7 +1312,7 @@ void retrieveservers(vector<char> &data)
resolver_data *rd = new resolver_data();
formatstring(rd->text)("retrieving servers from %s:%d... (esc to abort)", mastername, masterport);
show_out_of_renderloop_progress(0, rd->text);
rd->starttime = SDL_GetTicks();
rd->timeout = 0;
@@ -1320,6 +1320,7 @@ void retrieveservers(vector<char> &data)
int result = 0, httpresult = 0;
curl_easy_setopt(curl, CURLOPT_URL, request);
curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1); // Fixes crashbug for some buggy libcurl versions (Linux)
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_callback);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, outfile);
curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0);
@@ -1331,7 +1332,7 @@ void retrieveservers(vector<char> &data)
curl_easy_cleanup(curl);
curl = NULL;
if(outfile) fclose(outfile);
if(result == CURLE_OPERATION_TIMEDOUT || result == CURLE_COULDNT_RESOLVE_HOST)
{
clfail = true;