mirror of
https://github.com/glest/glest-source.git
synced 2025-08-16 13:23:59 +02:00
Fixed curl issue on Windows
This commit is contained in:
@@ -310,7 +310,7 @@ pair<FTP_Client_ResultType,string> FTPClientThread::getMapFromServer(pair<string
|
|||||||
CURL *curl = SystemFlags::initHTTP();
|
CURL *curl = SystemFlags::initHTTP();
|
||||||
if(curl) {
|
if(curl) {
|
||||||
ftpfile.stream = NULL;
|
ftpfile.stream = NULL;
|
||||||
|
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0);
|
||||||
char szBuf[8096]="";
|
char szBuf[8096]="";
|
||||||
if(mapFileName.second != "") {
|
if(mapFileName.second != "") {
|
||||||
snprintf(szBuf,8096,"%s",mapFileName.second.c_str());
|
snprintf(szBuf,8096,"%s",mapFileName.second.c_str());
|
||||||
@@ -967,7 +967,7 @@ pair<FTP_Client_ResultType,string> FTPClientThread::getFileFromServer(FTP_Clien
|
|||||||
CURL *curl = SystemFlags::initHTTP();
|
CURL *curl = SystemFlags::initHTTP();
|
||||||
if(curl) {
|
if(curl) {
|
||||||
ftpfile.stream = NULL;
|
ftpfile.stream = NULL;
|
||||||
|
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0);
|
||||||
char szBuf[8096]="";
|
char szBuf[8096]="";
|
||||||
if(fileNameTitle.second != "") {
|
if(fileNameTitle.second != "") {
|
||||||
snprintf(szBuf,8096,"%s",fileNameTitle.second.c_str());
|
snprintf(szBuf,8096,"%s",fileNameTitle.second.c_str());
|
||||||
|
@@ -119,7 +119,7 @@ std::string SystemFlags::getHTTP(std::string URL,CURL *handle,int timeOut,CURLco
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line %d]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||||
|
curl_easy_setopt(handle, CURLOPT_SSL_VERIFYPEER, 0);
|
||||||
curl_easy_setopt(handle, CURLOPT_URL, URL.c_str());
|
curl_easy_setopt(handle, CURLOPT_URL, URL.c_str());
|
||||||
|
|
||||||
/* send all data to this function */
|
/* send all data to this function */
|
||||||
@@ -203,6 +203,7 @@ CURL *SystemFlags::initHTTP() {
|
|||||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line %d] handle = %p\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,handle);
|
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line %d] handle = %p\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,handle);
|
||||||
curl_easy_setopt(handle, CURLOPT_NOSIGNAL, 1);
|
curl_easy_setopt(handle, CURLOPT_NOSIGNAL, 1);
|
||||||
curl_easy_setopt(handle, CURLOPT_FOLLOWLOCATION, 1);
|
curl_easy_setopt(handle, CURLOPT_FOLLOWLOCATION, 1);
|
||||||
|
curl_easy_setopt(handle, CURLOPT_SSL_VERIFYPEER, 0);
|
||||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line %d] handle = %p\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,handle);
|
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line %d] handle = %p\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,handle);
|
||||||
return handle;
|
return handle;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user