mirror of
https://github.com/glest/glest-source.git
synced 2025-08-15 12:54:01 +02:00
- more bugfixes related to ftp and firewall handling
This commit is contained in:
@@ -29,7 +29,11 @@ namespace Shared { namespace PlatformCommon {
|
||||
static std::map<uint32,uint32> clientToFTPServerList;
|
||||
|
||||
uint32 FindExternalFTPServerIp(uint32 clientIp) {
|
||||
return clientToFTPServerList[clientIp];
|
||||
uint32 result = clientToFTPServerList[clientIp];
|
||||
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf ("===> FTP Server thread clientIp = %u, result = %u\n",clientIp,result);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
FTPServerThread::FTPServerThread(std::pair<string,string> mapsPath,int portNumber) : BaseThread() {
|
||||
@@ -61,6 +65,8 @@ bool FTPServerThread::shutdownAndWait() {
|
||||
void FTPServerThread::addClientToServerIPAddress(uint32 clientIp,uint32 ServerIp) {
|
||||
//ftpSetSessionRemoteServerIp(clientIp, ServerIp);
|
||||
clientToFTPServerList[clientIp] = ServerIp;
|
||||
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf ("===> FTP Server thread clientIp = %u, ServerIp = %u\n",clientIp,ServerIp);
|
||||
}
|
||||
|
||||
void FTPServerThread::execute() {
|
||||
|
@@ -1669,8 +1669,12 @@ ServerSocket::~ServerSocket() {
|
||||
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
|
||||
stopBroadCastThread();
|
||||
NETremRedirects(ServerSocket::externalPort);
|
||||
NETremRedirects(ServerSocket::ftpServerPort);
|
||||
if (ServerSocket::enabledUPNP) {
|
||||
ServerSocket::enabledUPNP = false;
|
||||
|
||||
NETremRedirects(ServerSocket::externalPort);
|
||||
NETremRedirects(ServerSocket::ftpServerPort);
|
||||
}
|
||||
|
||||
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
}
|
||||
@@ -2054,10 +2058,10 @@ void ServerSocket::NETaddRedirects(int ports[4]) {
|
||||
|
||||
void ServerSocket::NETremRedirects(int ext_port) {
|
||||
SystemFlags::OutputDebug(SystemFlags::debugNetwork, "%s\n", __FUNCTION__);
|
||||
if (ServerSocket::enabledUPNP) {
|
||||
ServerSocket::enabledUPNP = false;
|
||||
upnp_rem_redirect(ext_port);
|
||||
}
|
||||
//if (ServerSocket::enabledUPNP) {
|
||||
//ServerSocket::enabledUPNP = false;
|
||||
upnp_rem_redirect(ext_port);
|
||||
//}
|
||||
}
|
||||
|
||||
void ServerSocket::NETdiscoverUPnPDevices() {
|
||||
|
Reference in New Issue
Block a user