]> sjero.net Git - wget/blobdiff - src/ftp.c
[svn] Simplify the ip_address data union. Always use inet_ntop for printing
[wget] / src / ftp.c
index 7b79b8e2100ff25a8c946f3172d25855a4282e61..9b6fc8710efc13face668fbbb64686c801ed0fee 100644 (file)
--- a/src/ftp.c
+++ b/src/ftp.c
@@ -116,14 +116,14 @@ ftp_do_pasv (int csock, ip_address *addr, int *port)
   /* If our control connection is over IPv6, then we first try EPSV and then 
    * LPSV if the former is not supported. If the control connection is over 
    * IPv4, we simply issue the good old PASV request. */
-  switch (addr->type)
+  switch (addr->family)
     {
-    case IPV4_ADDRESS:
+    case AF_INET:
       if (!opt.server_response)
         logputs (LOG_VERBOSE, "==> PASV ... ");
       err = ftp_pasv (csock, addr, port);
       break;
-    case IPV6_ADDRESS:
+    case AF_INET6:
       if (!opt.server_response)
         logputs (LOG_VERBOSE, "==> EPSV ... ");
       err = ftp_epsv (csock, addr, port);
@@ -159,14 +159,14 @@ ftp_do_port (int csock, int *local_sock)
   /* If our control connection is over IPv6, then we first try EPRT and then 
    * LPRT if the former is not supported. If the control connection is over 
    * IPv4, we simply issue the good old PORT request. */
-  switch (cip.type)
+  switch (cip.family)
     {
-    case IPV4_ADDRESS:
+    case AF_INET:
       if (!opt.server_response)
         logputs (LOG_VERBOSE, "==> PORT ... ");
       err = ftp_port (csock, local_sock);
       break;
-    case IPV6_ADDRESS:
+    case AF_INET6:
       if (!opt.server_response)
         logputs (LOG_VERBOSE, "==> EPRT ... ");
       err = ftp_eprt (csock, local_sock);