about summary refs log tree commit diff
path: root/Src/Modules/zftp.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/Modules/zftp.c')
-rw-r--r--Src/Modules/zftp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Src/Modules/zftp.c b/Src/Modules/zftp.c
index 6ee0f0156..80e09045c 100644
--- a/Src/Modules/zftp.c
+++ b/Src/Modules/zftp.c
@@ -863,7 +863,7 @@ zfopendata(char *name, union tcp_sockaddr *zdsockp, int *is_passivep)
 	zwarnnam(name, "Must set preference S or P to transfer data", NULL, 0);
 	return 1;
     }
-    zfsess->dfd = socket(AF_INET, SOCK_STREAM, 0);
+    zfsess->dfd = socket(zfsess->control->peer.a.sa_family, SOCK_STREAM, 0);
     if (zfsess->dfd < 0) {
 	zwarnnam(name, "can't get data socket: %e", NULL, errno);
 	return 1;
@@ -907,7 +907,7 @@ zfopendata(char *name, union tcp_sockaddr *zdsockp, int *is_passivep)
 	    delim = ptr[1];
 	    if(delim < 33 || delim > 126 || ptr[2] != delim || ptr[3] != delim)
 		goto bad_epsv;
-	    ptr += 3;
+	    ptr += 4;
 	    end = strchr(ptr, delim);
 	    if(!end || end[1] != ')')
 		goto bad_epsv;