mirror of
https://github.com/glest/glest-source.git
synced 2025-08-23 16:32:53 +02:00
- more ftp updates
This commit is contained in:
@@ -963,7 +963,9 @@ void MenuStateConnectedGame::update() {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// try to get the map via ftp
|
// try to get the map via ftp
|
||||||
|
if(ftpClientThread != NULL) {
|
||||||
|
ftpClientThread->addMapToRequests(currentMap);
|
||||||
|
}
|
||||||
maps.push_back("***missing***");
|
maps.push_back("***missing***");
|
||||||
}
|
}
|
||||||
listBoxMap.setItems(maps);
|
listBoxMap.setItems(maps);
|
||||||
|
@@ -17,6 +17,7 @@
|
|||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
#include <curl/types.h>
|
#include <curl/types.h>
|
||||||
#include <curl/easy.h>
|
#include <curl/easy.h>
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
using namespace Shared::Util;
|
using namespace Shared::Util;
|
||||||
using namespace Shared::PlatformCommon;
|
using namespace Shared::PlatformCommon;
|
||||||
@@ -150,7 +151,9 @@ void FTPClientThread::getMapFromServer(string mapFileName) {
|
|||||||
|
|
||||||
void FTPClientThread::addMapToRequests(string mapFilename) {
|
void FTPClientThread::addMapToRequests(string mapFilename) {
|
||||||
MutexSafeWrapper safeMutex(&mutexMapFileList);
|
MutexSafeWrapper safeMutex(&mutexMapFileList);
|
||||||
mapFileList.push_back(mapFilename);
|
if(std::find(mapFileList.begin(),mapFileList.end(),mapFilename) == mapFileList.end()) {
|
||||||
|
mapFileList.push_back(mapFilename);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user