Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: bbadf44527
Fetching contributors…

Cannot retrieve contributors at this time

17 lines (13 sloc) 0.562 kb
diff --git a/lib/ftp.c b/lib/ftp.c
index cd067e0..b1f61f9 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -214,8 +214,10 @@ static CURLcode AllowServerConnect(struct connectdata *conn)
socklen_t size = (socklen_t) sizeof(struct sockaddr_in);
struct sockaddr_in add;
- if(0 == getsockname(sock, (struct sockaddr *) &add, &size))
+ if(0 == getsockname(sock, (struct sockaddr *) &add, &size)) {
+ size = sizeof(add);
s=accept(sock, (struct sockaddr *) &add, &size);
+ }
sclose(sock); /* close the first socket */
Jump to Line
Something went wrong with that request. Please try again.