mirror of
https://github.com/glest/glest-source.git
synced 2025-08-20 07:01:21 +02:00
- bugfix for code compiled in VC++
This commit is contained in:
@@ -280,8 +280,7 @@ socket_t ftpEstablishDataConnection(int passive, ip_t *ip, port_t *port, int ses
|
|||||||
//myAddr.sin_port = htons(0);
|
//myAddr.sin_port = htons(0);
|
||||||
myAddr.sin_port = htons(ftpGetPassivePort() + sessionId);
|
myAddr.sin_port = htons(ftpGetPassivePort() + sessionId);
|
||||||
|
|
||||||
int val = 1;
|
setsockopt(dataSocket, SOL_SOCKET, SO_REUSEADDR, (char *)&on, sizeof(on));
|
||||||
setsockopt(dataSocket, SOL_SOCKET, SO_REUSEADDR, (char *)&val, sizeof(val));
|
|
||||||
|
|
||||||
if(bind(dataSocket, (struct sockaddr *)&myAddr, sizeof(myAddr)))
|
if(bind(dataSocket, (struct sockaddr *)&myAddr, sizeof(myAddr)))
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user