mirror of
https://github.com/glest/glest-source.git
synced 2025-08-18 14:11:15 +02:00
- better handling of mod menu threading when user has no internet connection
This commit is contained in:
@@ -103,7 +103,7 @@ std::string SystemFlags::escapeURL(std::string URL, CURL *handle) {
|
||||
return result;
|
||||
}
|
||||
|
||||
std::string SystemFlags::getHTTP(std::string URL,CURL *handle,int timeOut) {
|
||||
std::string SystemFlags::getHTTP(std::string URL,CURL *handle,int timeOut,CURLcode *savedResult) {
|
||||
if(handle == NULL) {
|
||||
handle = SystemFlags::curl_handle;
|
||||
}
|
||||
@@ -155,10 +155,15 @@ std::string SystemFlags::getHTTP(std::string URL,CURL *handle,int timeOut) {
|
||||
if(chunk.memory) {
|
||||
free(chunk.memory);
|
||||
}
|
||||
|
||||
if(savedResult != NULL) {
|
||||
*savedResult = result;
|
||||
}
|
||||
if(result != CURLE_OK) {
|
||||
serverResponse = errbuf;
|
||||
}
|
||||
|
||||
|
||||
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line %d] serverResponse [%s]\n",__FILE__,__FUNCTION__,__LINE__,serverResponse.c_str());
|
||||
|
||||
return serverResponse;
|
||||
|
Reference in New Issue
Block a user