Ticket #1796: FTPFS does not work in active mode

Fixed error with active mode of ftpfs.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
This commit is contained in:
Slava Zanko 2009-11-24 11:35:53 +02:00
parent 09f962f5a6
commit d712d2638e

View File

@ -982,7 +982,7 @@ again:
memset (&data_addr, 0, sizeof (struct sockaddr_storage));
data_addrlen = sizeof (struct sockaddr_storage);
if (getpeername (SUP.sock, (struct sockaddr *) &data_addr, &data_addrlen) == -1)
if (getsockname (SUP.sock, (struct sockaddr *) &data_addr, &data_addrlen) == -1)
return -1;
switch (data_addr.ss_family) {