- more ftp updates
This commit is contained in:
parent
9442c22dc3
commit
e79147796f
|
@ -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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user