- better handling of mod menu threading when user has no internet connection

This commit is contained in:
Mark Vejvoda
2011-03-26 05:03:38 +00:00
parent 15e00694bf
commit 6079e6de2b
4 changed files with 92 additions and 12 deletions

View File

@@ -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;