mirror of
https://github.com/glest/glest-source.git
synced 2025-08-30 03:09:49 +02:00
- bugfixes for ftp server to work on windows, silly M$ compiler has issues with mixing C / C++ code so I had to make these changes
This commit is contained in:
@@ -36,6 +36,11 @@
|
||||
*/
|
||||
LOCAL socket_t server;
|
||||
|
||||
void ftpInit(ftpFindExternalFTPServerIpType cb1, ftpAddUPNPPortForwardType cb2, ftpRemoveUPNPPortForwardType cb3) {
|
||||
ftpFindExternalFTPServerIp = cb1;
|
||||
ftpAddUPNPPortForward = cb2;
|
||||
ftpRemoveUPNPPortForward = cb3;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Initializes and starts the server
|
||||
@@ -48,7 +53,6 @@ int ftpStart(int portNumber)
|
||||
{
|
||||
server = -1; // set server socket to invalid value
|
||||
|
||||
|
||||
if(VERBOSE_MODE_ENABLED) printf("Feathery FTP-Server\n");
|
||||
|
||||
ftpArchInit();
|
||||
|
@@ -28,8 +28,8 @@ namespace Shared { namespace PlatformCommon {
|
||||
|
||||
static std::map<uint32,uint32> clientToFTPServerList;
|
||||
|
||||
uint32 FindExternalFTPServerIp(uint32 clientIp) {
|
||||
uint32 result = clientToFTPServerList[clientIp];
|
||||
ip_t FindExternalFTPServerIp(ip_t clientIp) {
|
||||
ip_t result = clientToFTPServerList[clientIp];
|
||||
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf ("===> FTP Server thread clientIp = %u, result = %u\n",clientIp,result);
|
||||
|
||||
@@ -40,9 +40,7 @@ FTPServerThread::FTPServerThread(std::pair<string,string> mapsPath,int portNumbe
|
||||
this->mapsPath = mapsPath;
|
||||
this->portNumber = portNumber;
|
||||
|
||||
ftpAddUPNPPortForward = &UPNP_Tools::AddUPNPPortForward;
|
||||
ftpRemoveUPNPPortForward = &UPNP_Tools::RemoveUPNPPortForward;
|
||||
ftpFindExternalFTPServerIp = &FindExternalFTPServerIp;
|
||||
ftpInit(&FindExternalFTPServerIp,&UPNP_Tools::AddUPNPPortForward,&UPNP_Tools::RemoveUPNPPortForward);
|
||||
VERBOSE_MODE_ENABLED = SystemFlags::VERBOSE_MODE_ENABLED;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user