- some initial changes to try to get ftp working over the Internet with firewalls etc

This commit is contained in:
Mark Vejvoda
2010-12-30 15:56:02 +00:00
parent 2ca50ee9f9
commit 3f0ee7a6cb
19 changed files with 265 additions and 77 deletions

View File

@@ -32,16 +32,18 @@
#pragma comment(lib, "ws2_32")
#pragma comment(lib, "MSWSOCK")
ip_t ownIp;
ip_t ownIp;
//ip_t ownExternalIp;
LOCAL fd_set watchedSockets;
LOCAL fd_set signaledSockets;
LOCAL int maxSockNr;
void ftpArchInit(void)
void ftpArchInit()
{
WSADATA wsaData;
ownIp = 0;
ownIp = 0;
//ownExternalIp = externalIp;
maxSockNr = 0;
FD_ZERO(&watchedSockets);
WSAStartup(MAKEWORD(2, 0),&wsaData);
@@ -291,6 +293,9 @@ socket_t ftpEstablishDataConnection(int passive, ip_t *ip, port_t *port)
*port = ntohs(myAddr.sin_port);
*ip = ownIp;
//if(ownExternalIp > 0) {
// *ip = ownExternalIp;
//}
if(listen(dataSocket, 1))
{