|
|
@@ -1,6 +1,7 @@
|
|
|
---- nanoftp.c.dist 2003-07-09 16:36:59.000000000 +0200
|
|
|
-+++ nanoftp.c 2003-07-09 16:48:21.000000000 +0200
|
|
|
-@@ -1480,7 +1480,7 @@
|
|
|
+Index: nanoftp.c
|
|
|
+--- nanoftp.c.orig 2003-10-10 17:49:38.000000000 +0200
|
|
|
++++ nanoftp.c 2003-10-22 20:55:34.000000000 +0200
|
|
|
+@@ -1553,7 +1553,7 @@
|
|
|
|
|
|
memset (&dataAddr, 0, sizeof(dataAddr));
|
|
|
#ifdef SUPPORT_IP6
|
|
|
@@ -9,7 +10,7 @@
|
|
|
ctxt->dataFd = socket (AF_INET6, SOCK_STREAM, IPPROTO_TCP);
|
|
|
((struct sockaddr_in6 *)&dataAddr)->sin6_family = AF_INET6;
|
|
|
dataAddrLen = sizeof(struct sockaddr_in6);
|
|
|
-@@ -1500,7 +1500,7 @@
|
|
|
+@@ -1572,7 +1572,7 @@
|
|
|
|
|
|
if (ctxt->passive) {
|
|
|
#ifdef SUPPORT_IP6
|
|
|
@@ -18,16 +19,16 @@
|
|
|
snprintf (buf, sizeof(buf), "EPSV\r\n");
|
|
|
else
|
|
|
#endif
|
|
|
-@@ -1530,7 +1530,7 @@
|
|
|
+@@ -1603,7 +1603,7 @@
|
|
|
cur = &ctxt->controlBuf[ctxt->controlBufAnswer];
|
|
|
while (((*cur < '0') || (*cur > '9')) && *cur != '\0') cur++;
|
|
|
#ifdef SUPPORT_IP6
|
|
|
- if ((ctxt->ftpAddr).ss_family == AF_INET6) {
|
|
|
+ if (((struct sockaddr *)&ctxt->ftpAddr)->sa_family == AF_INET6) {
|
|
|
if (sscanf (cur, "%u", &temp[0]) != 1) {
|
|
|
- xmlGenericError (xmlGenericErrorContext,
|
|
|
+ __xmlIOErr(XML_FROM_FTP, XML_FTP_EPSV_ANSWER,
|
|
|
"Invalid answer to EPSV\n");
|
|
|
-@@ -1568,7 +1568,7 @@
|
|
|
+@@ -1640,7 +1640,7 @@
|
|
|
} else {
|
|
|
getsockname(ctxt->dataFd, (struct sockaddr *) &dataAddr, &dataAddrLen);
|
|
|
#ifdef SUPPORT_IP6
|
|
|
@@ -36,16 +37,7 @@
|
|
|
((struct sockaddr_in6 *)&dataAddr)->sin6_port = 0;
|
|
|
else
|
|
|
#endif
|
|
|
-@@ -1584,7 +1584,7 @@
|
|
|
-
|
|
|
- if (listen(ctxt->dataFd, 1) < 0) {
|
|
|
- #ifdef SUPPORT_IP6
|
|
|
-- if ((ctxt->ftpAddr).ss_family == AF_INET6)
|
|
|
-+ if (((struct sockaddr *)&ctxt->ftpAddr)->sa_family == AF_INET6)
|
|
|
- xmlGenericError (xmlGenericErrorContext,
|
|
|
- "Could not listen on port %d\n",
|
|
|
- ntohs (((struct sockaddr_in6 *)&dataAddr)->sin6_port));
|
|
|
-@@ -1597,7 +1597,7 @@
|
|
|
+@@ -1659,7 +1659,7 @@
|
|
|
return (-1);
|
|
|
}
|
|
|
#ifdef SUPPORT_IP6
|