From e79147796f00903a968ea65f2e0e224e85924a01 Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Wed, 29 Dec 2010 01:32:55 +0000 Subject: [PATCH] - more ftp updates --- source/glest_game/menu/menu_state_connected_game.cpp | 4 +++- source/shared_lib/sources/platform/posix/miniftpclient.cpp | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/source/glest_game/menu/menu_state_connected_game.cpp b/source/glest_game/menu/menu_state_connected_game.cpp index 070caadf..ac4d1d5a 100644 --- a/source/glest_game/menu/menu_state_connected_game.cpp +++ b/source/glest_game/menu/menu_state_connected_game.cpp @@ -963,7 +963,9 @@ void MenuStateConnectedGame::update() { } else { // try to get the map via ftp - + if(ftpClientThread != NULL) { + ftpClientThread->addMapToRequests(currentMap); + } maps.push_back("***missing***"); } listBoxMap.setItems(maps); diff --git a/source/shared_lib/sources/platform/posix/miniftpclient.cpp b/source/shared_lib/sources/platform/posix/miniftpclient.cpp index 10d5ab57..56ae766e 100644 --- a/source/shared_lib/sources/platform/posix/miniftpclient.cpp +++ b/source/shared_lib/sources/platform/posix/miniftpclient.cpp @@ -17,6 +17,7 @@ #include #include #include +#include using namespace Shared::Util; using namespace Shared::PlatformCommon; @@ -150,7 +151,9 @@ void FTPClientThread::getMapFromServer(string mapFileName) { void FTPClientThread::addMapToRequests(string mapFilename) { MutexSafeWrapper safeMutex(&mutexMapFileList); - mapFileList.push_back(mapFilename); + if(std::find(mapFileList.begin(),mapFileList.end(),mapFilename) == mapFileList.end()) { + mapFileList.push_back(mapFilename); + } }