mirror of
https://github.com/glest/glest-source.git
synced 2025-02-25 04:02:30 +01:00
- bugfix for compiling in VC++
This commit is contained in:
parent
3f0ee7a6cb
commit
1480d7c68d
@ -667,6 +667,7 @@ LOCAL int ftpCmdPasv(int sessionId, const char* args, int len)
|
||||
uint32_t ip;
|
||||
char str[50];
|
||||
socket_t s;
|
||||
uint32_t remoteFTPServerIp;
|
||||
|
||||
if(ftpGetSession(sessionId)->passiveDataSocket >= 0)
|
||||
{
|
||||
@ -688,7 +689,7 @@ LOCAL int ftpCmdPasv(int sessionId, const char* args, int len)
|
||||
ftpAddUPNPPortForward(port, port);
|
||||
}
|
||||
|
||||
ip_t remoteFTPServerIp = ftpFindExternalFTPServerIp(ftpGetSession(sessionId)->remoteIp);
|
||||
remoteFTPServerIp = ftpFindExternalFTPServerIp(ftpGetSession(sessionId)->remoteIp);
|
||||
|
||||
sprintf(str, "%s (%d,%d,%d,%d,%d,%d)",
|
||||
ftpMsg029,
|
||||
|
@ -307,11 +307,12 @@ string Ip::getString() const{
|
||||
#if defined(__FreeBSD__) || defined(BSD) || defined(__APPLE__) || defined(__linux__)
|
||||
# define USE_GETIFADDRS 1
|
||||
# include <ifaddrs.h>
|
||||
#endif
|
||||
|
||||
static uint32 SockAddrToUint32(struct sockaddr * a)
|
||||
{
|
||||
return ((a)&&(a->sa_family == AF_INET)) ? ntohl(((struct sockaddr_in *)a)->sin_addr.s_addr) : 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
// convert a numeric IP address into its string representation
|
||||
static void Inet_NtoA(uint32 addr, char * ipbuf)
|
||||
|
Loading…
x
Reference in New Issue
Block a user