]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/ftp.cc
SourceLayout: Add Ip namespace for internal libip
[thirdparty/squid.git] / src / ftp.cc
index 2a3c8fbc5fb9dc99592fd6033cf12046c85cd7ca..eff4ddc7f6b7562183fa3c7d5b1e21791044951a 100644 (file)
@@ -2297,7 +2297,7 @@ ftpReadEPSV(FtpStateData* ftpState)
     char h1, h2, h3, h4;
     int n;
     u_short port;
-    IpAddress ipa_remote;
+    Ip::Address ipa_remote;
     int fd = ftpState->data.fd;
     char *buf;
     debugs(9, 3, HERE);
@@ -2418,7 +2418,7 @@ ftpReadEPSV(FtpStateData* ftpState)
 static void
 ftpSendPassive(FtpStateData * ftpState)
 {
-    IpAddress addr;
+    Ip::Address addr;
     struct addrinfo *AI = NULL;
 
     /** Checks the server control channel is still available before running. */
@@ -2603,7 +2603,7 @@ ftpReadPasv(FtpStateData * ftpState)
     int p1, p2;
     int n;
     u_short port;
-    IpAddress ipa_remote;
+    Ip::Address ipa_remote;
     int fd = ftpState->data.fd;
     char *buf;
     LOCAL_ARRAY(char, ipaddr, 1024);
@@ -2709,8 +2709,7 @@ static int
 ftpOpenListenSocket(FtpStateData * ftpState, int fallback)
 {
     int fd;
-
-    IpAddress addr;
+    Ip::Address addr;
     struct addrinfo *AI = NULL;
     int on = 1;
     int x = 0;
@@ -2780,8 +2779,7 @@ static void
 ftpSendPORT(FtpStateData * ftpState)
 {
     int fd;
-
-    IpAddress ipa;
+    Ip::Address ipa;
     struct addrinfo *AI = NULL;
     unsigned char *addrptr;
     unsigned char *portptr;
@@ -2852,7 +2850,7 @@ static void
 ftpSendEPRT(FtpStateData * ftpState)
 {
     int fd;
-    IpAddress addr;
+    Ip::Address addr;
     struct addrinfo *AI = NULL;
     char buf[MAX_IPSTRLEN];
 
@@ -2865,10 +2863,10 @@ ftpSendEPRT(FtpStateData * ftpState)
     ftpState->flags.pasv_supported = 0;
     fd = ftpOpenListenSocket(ftpState, 0);
 
-    addr.InitAddrInfo(AI);
+    Ip::Address::InitAddrInfo(AI);
 
     if (getsockname(fd, AI->ai_addr, &AI->ai_addrlen)) {
-        addr.FreeAddrInfo(AI);
+        Ip::Address::FreeAddrInfo(AI);
         debugs(9, DBG_CRITICAL, HERE << "getsockname(" << fd << ",..): " << xstrerror());
 
         /* XXX Need to set error message */
@@ -2888,7 +2886,7 @@ ftpSendEPRT(FtpStateData * ftpState)
     ftpState->writeCommand(cbuf);
     ftpState->state = SENT_EPRT;
 
-    addr.FreeAddrInfo(AI);
+    Ip::Address::FreeAddrInfo(AI);
 }
 
 static void