]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Windows: rename Ip::Address::*AddrInfo() methods
authorAmos Jeffries <squid3@treenet.co.nz>
Thu, 25 Sep 2014 13:33:18 +0000 (06:33 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Thu, 25 Sep 2014 13:33:18 +0000 (06:33 -0700)
On MinGW at least macro replacement appears to be case insensitive.
The lower-case freeaddrinfo/initaddrinfo system functions are defined
with macros, both in MinGW headers and Squid libcompat.

16 files changed:
src/clients/FtpGateway.cc
src/comm.cc
src/comm/ConnOpener.cc
src/comm/TcpAcceptor.cc
src/icmp/Icmp4.cc
src/icmp/Icmp6.cc
src/ip/Address.cc
src/ip/Address.h
src/ip/testAddress.cc
src/ipc.cc
src/ipc/SharedListen.cc
src/ipc/UdsOp.cc
src/ipc_win32.cc
src/tools.cc
tools/cachemgr.cc
tools/squidclient/Transport.cc

index f6f439820cd14ff34ce6866cf2d0df25a3b24054..254db92db636aac23ae65ac1b2bf118d9b3ffaa7 100644 (file)
@@ -1868,7 +1868,7 @@ ftpSendPORT(Ftp::Gateway * ftpState)
     ftpState->writeCommand(cbuf);
     ftpState->state = Ftp::Client::SENT_PORT;
 
-    Ip::Address::FreeAddrInfo(AI);
+    Ip::Address::FreeAddr(AI);
 }
 
 static void
index bb0210c77f162048cb87cc6789fcfa4194d46ea6..659cd27c32567e25944e6afe2c8c040c6a451b5c 100644 (file)
@@ -120,10 +120,10 @@ comm_udp_recvfrom(int fd, void *buf, size_t len, int flags, Ip::Address &from)
     ++ statCounter.syscalls.sock.recvfroms;
     debugs(5,8, "comm_udp_recvfrom: FD " << fd << " from " << from);
     struct addrinfo *AI = NULL;
-    Ip::Address::InitAddrInfo(AI);
+    Ip::Address::InitAddr(AI);
     int x = recvfrom(fd, buf, len, flags, AI->ai_addr, &AI->ai_addrlen);
     from = *AI;
-    Ip::Address::FreeAddrInfo(AI);
+    Ip::Address::FreeAddr(AI);
     return x;
 }
 
@@ -173,16 +173,16 @@ comm_local_port(int fd)
     if (F->sock_family == AF_INET)
         temp.setIPv4();
 
-    Ip::Address::InitAddrInfo(addr);
+    Ip::Address::InitAddr(addr);
 
     if (getsockname(fd, addr->ai_addr, &(addr->ai_addrlen)) ) {
         debugs(50, DBG_IMPORTANT, "comm_local_port: Failed to retrieve TCP/UDP port number for socket: FD " << fd << ": " << xstrerror());
-        Ip::Address::FreeAddrInfo(addr);
+        Ip::Address::FreeAddr(addr);
         return 0;
     }
     temp = *addr;
 
-    Ip::Address::FreeAddrInfo(addr);
+    Ip::Address::FreeAddr(addr);
 
     if (F->local_addr.isAnyAddr()) {
         /* save the whole local address, not just the port. */
@@ -347,7 +347,7 @@ comm_openex(int sock_type,
     /* try again as IPv4-native if possible */
     if ( new_socket < 0 && Ip::EnableIpv6 && addr.isIPv6() && addr.setIPv4() ) {
         /* attempt to open this IPv4-only. */
-        Ip::Address::FreeAddrInfo(AI);
+        Ip::Address::FreeAddr(AI);
         /* Setup the socket addrinfo details for use */
         addr.getAddrInfo(AI);
         AI->ai_socktype = sock_type;
@@ -369,7 +369,7 @@ comm_openex(int sock_type,
             debugs(50, DBG_CRITICAL, "comm_open: socket failure: " << xstrerror());
         }
 
-        Ip::Address::FreeAddrInfo(AI);
+        Ip::Address::FreeAddr(AI);
 
         PROF_stop(comm_open);
         return -1;
@@ -393,7 +393,7 @@ comm_openex(int sock_type,
     comm_init_opened(conn, note, AI);
     new_socket = comm_apply_flags(conn->fd, addr, flags, AI);
 
-    Ip::Address::FreeAddrInfo(AI);
+    Ip::Address::FreeAddr(AI);
 
     PROF_stop(comm_open);
 
@@ -680,7 +680,7 @@ comm_connect_addr(int sock, const Ip::Address &address)
 
     }
 
-    Ip::Address::FreeAddrInfo(AI);
+    Ip::Address::FreeAddr(AI);
 
     PROF_stop(comm_connect_addr);
 
@@ -951,7 +951,7 @@ comm_udp_sendto(int fd,
     struct addrinfo *AI = NULL;
     to_addr.getAddrInfo(AI, fd_table[fd].sock_family);
     int x = sendto(fd, buf, len, 0, AI->ai_addr, AI->ai_addrlen);
-    Ip::Address::FreeAddrInfo(AI);
+    Ip::Address::FreeAddr(AI);
 
     PROF_stop(comm_udp_sendto);
 
index 3247d74098417c3c944f2f10e90b1c3cf9b1edd1..b8eb95244e8643c8a2c1f51d78931efd3a07a572 100644 (file)
@@ -407,16 +407,16 @@ void
 Comm::ConnOpener::lookupLocalAddress()
 {
     struct addrinfo *addr = NULL;
-    Ip::Address::InitAddrInfo(addr);
+    Ip::Address::InitAddr(addr);
 
     if (getsockname(conn_->fd, addr->ai_addr, &(addr->ai_addrlen)) != 0) {
         debugs(50, DBG_IMPORTANT, "ERROR: Failed to retrieve TCP/UDP details for socket: " << conn_ << ": " << xstrerror());
-        Ip::Address::FreeAddrInfo(addr);
+        Ip::Address::FreeAddr(addr);
         return;
     }
 
     conn_->local = *addr;
-    Ip::Address::FreeAddrInfo(addr);
+    Ip::Address::FreeAddr(addr);
     debugs(5, 6, HERE << conn_);
 }
 
index a214cae158d69f238e526c717b2b9c18b71144d5..995de5fabfb43a82e26b8da2cbe166a2796c4de2 100644 (file)
@@ -336,13 +336,13 @@ Comm::TcpAcceptor::oldAccept(Comm::ConnectionPointer &details)
     ++statCounter.syscalls.sock.accepts;
     int sock;
     struct addrinfo *gai = NULL;
-    Ip::Address::InitAddrInfo(gai);
+    Ip::Address::InitAddr(gai);
 
     errcode = 0; // reset local errno copy.
     if ((sock = accept(conn->fd, gai->ai_addr, &gai->ai_addrlen)) < 0) {
         errcode = errno; // store last accept errno locally.
 
-        Ip::Address::FreeAddrInfo(gai);
+        Ip::Address::FreeAddr(gai);
 
         PROF_stop(comm_accept);
 
@@ -365,21 +365,21 @@ Comm::TcpAcceptor::oldAccept(Comm::ConnectionPointer &details)
     if ( Config.client_ip_max_connections >= 0) {
         if (clientdbEstablished(details->remote, 0) > Config.client_ip_max_connections) {
             debugs(50, DBG_IMPORTANT, "WARNING: " << details->remote << " attempting more than " << Config.client_ip_max_connections << " connections.");
-            Ip::Address::FreeAddrInfo(gai);
+            Ip::Address::FreeAddr(gai);
             return Comm::COMM_ERROR;
         }
     }
 
     // lookup the local-end details of this new connection
-    Ip::Address::InitAddrInfo(gai);
+    Ip::Address::InitAddr(gai);
     details->local.setEmpty();
     if (getsockname(sock, gai->ai_addr, &gai->ai_addrlen) != 0) {
         debugs(50, DBG_IMPORTANT, "ERROR: getsockname() failed to locate local-IP on " << details << ": " << xstrerror());
-        Ip::Address::FreeAddrInfo(gai);
+        Ip::Address::FreeAddr(gai);
         return Comm::COMM_ERROR;
     }
     details->local = *gai;
-    Ip::Address::FreeAddrInfo(gai);
+    Ip::Address::FreeAddr(gai);
 
     /* fdstat update */
     // XXX : these are not all HTTP requests. use a note about type and ip:port details->
index 75a012f33ae9a476e776c659186e16a04aea9724..02f19d33a1b9bf67c2aa697cd291c97d3be7de59 100644 (file)
@@ -146,7 +146,7 @@ Icmp4::SendEcho(Ip::Address &to, int opcode, const char *payload, int len)
     }
 
     Log(to, ' ', NULL, 0, 0);
-    Ip::Address::FreeAddrInfo(S);
+    Ip::Address::FreeAddr(S);
 }
 
 void
@@ -170,7 +170,7 @@ Icmp4::Recv(void)
     if (pkt == NULL)
         pkt = (char *)xmalloc(MAX_PKT4_SZ);
 
-    Ip::Address::InitAddrInfo(from);
+    Ip::Address::InitAddr(from);
     n = recvfrom(icmp_sock,
                  (void *)pkt,
                  MAX_PKT4_SZ,
@@ -180,7 +180,7 @@ Icmp4::Recv(void)
 
     if (n <= 0) {
         debugs(42, DBG_CRITICAL, HERE << "Error when calling recvfrom() on ICMP socket.");
-        Ip::Address::FreeAddrInfo(from);
+        Ip::Address::FreeAddr(from);
         return;
     }
 
@@ -219,12 +219,12 @@ Icmp4::Recv(void)
     icmp = (struct icmphdr *) (void *) (pkt + iphdrlen);
 
     if (icmp->icmp_type != ICMP_ECHOREPLY) {
-        Ip::Address::FreeAddrInfo(from);
+        Ip::Address::FreeAddr(from);
         return;
     }
 
     if (icmp->icmp_id != icmp_ident) {
-        Ip::Address::FreeAddrInfo(from);
+        Ip::Address::FreeAddr(from);
         return;
     }
 
@@ -242,14 +242,14 @@ Icmp4::Recv(void)
 
     if (preply.psize < 0) {
         debugs(42, DBG_CRITICAL, HERE << "Malformed ICMP packet.");
-        Ip::Address::FreeAddrInfo(from);
+        Ip::Address::FreeAddr(from);
         return;
     }
 
     control.SendResult(preply, (sizeof(pingerReplyData) - MAX_PKT4_SZ + preply.psize) );
 
     Log(preply.from, icmp->icmp_type, IcmpPacketType(icmp->icmp_type), preply.rtt, preply.hops);
-    Ip::Address::FreeAddrInfo(from);
+    Ip::Address::FreeAddr(from);
 }
 
 #endif /* USE_ICMP */
index 07b3bd232e8887633604d28479ba54342cd1bbc1..d9e362768910013047ba505aebc523869778c3a9 100644 (file)
@@ -183,7 +183,7 @@ Icmp6::SendEcho(Ip::Address &to, int opcode, const char *payload, int len)
     debugs(42,9, HERE << "x=" << x);
 
     Log(to, 0, NULL, 0, 0);
-    Ip::Address::FreeAddrInfo(S);
+    Ip::Address::FreeAddr(S);
 }
 
 /**
@@ -210,7 +210,7 @@ Icmp6::Recv(void)
         pkt = (char *)xmalloc(MAX_PKT6_SZ);
     }
 
-    Ip::Address::InitAddrInfo(from);
+    Ip::Address::InitAddr(from);
 
     n = recvfrom(icmp_sock,
                  (void *)pkt,
@@ -221,7 +221,7 @@ Icmp6::Recv(void)
 
     if (n <= 0) {
         debugs(42, DBG_CRITICAL, HERE << "Error when calling recvfrom() on ICMPv6 socket.");
-        Ip::Address::FreeAddrInfo(from);
+        Ip::Address::FreeAddr(from);
         return;
     }
 
@@ -282,13 +282,13 @@ Icmp6::Recv(void)
             debugs(42, 8, HERE << preply.from << " said: " << icmp6header->icmp6_type << "/" << (int)icmp6header->icmp6_code << " " <<
                    IcmpPacketType(icmp6header->icmp6_type));
         }
-        Ip::Address::FreeAddrInfo(from);
+        Ip::Address::FreeAddr(from);
         return;
     }
 
     if (icmp6header->icmp6_id != icmp_ident) {
         debugs(42, 8, HERE << "dropping Icmp6 read. IDENT check failed. ident=='" << icmp_ident << "'=='" << icmp6header->icmp6_id << "'");
-        Ip::Address::FreeAddrInfo(from);
+        Ip::Address::FreeAddr(from);
         return;
     }
 
@@ -325,7 +325,7 @@ Icmp6::Recv(void)
 
     /* send results of the lookup back to squid.*/
     control.SendResult(preply, (sizeof(pingerReplyData) - PINGER_PAYLOAD_SZ + preply.psize) );
-    Ip::Address::FreeAddrInfo(from);
+    Ip::Address::FreeAddr(from);
 }
 
 #endif /* USE_ICMP */
index 6bae054387b9b8712ee3eac7709c690b4851bf1c..682a20b8d2b1c411b2f7135b7d8a81ccf6d0215a 100644 (file)
@@ -649,7 +649,7 @@ Ip::Address::getAddrInfo(struct addrinfo *&dst, int force) const
 }
 
 void
-Ip::Address::InitAddrInfo(struct addrinfo *&ai)
+Ip::Address::InitAddr(struct addrinfo *&ai)
 {
     if (ai == NULL) {
         ai = new addrinfo;
@@ -667,7 +667,7 @@ Ip::Address::InitAddrInfo(struct addrinfo *&ai)
 }
 
 void
-Ip::Address::FreeAddrInfo(struct addrinfo *&ai)
+Ip::Address::FreeAddr(struct addrinfo *&ai)
 {
     if (ai == NULL) return;
 
index 03d0fa077313941b4c45d95a1a83a341c8a4e5e4..d8a6f126265df4a9cd2d83f123774e34d6142a1c 100644 (file)
@@ -256,13 +256,13 @@ public:
      *  Get RFC 3493 addrinfo structure from the Ip::Address data
      *  for protocol-neutral socket operations.
      *  Should be passed a NULL pointer of type struct addrinfo* it will
-     *  allocate memory for the structures involved. (see FreeAddrInfo to clear).
+     *  allocate memory for the structures involved. (see FreeAddr() to clear).
      *  Defaults to a TCP streaming socket, if other values (such as UDP) are needed
      *  the caller MUST override these default settings.
      *  Some situations may also require an actual call to the system getaddrinfo()
      *  to pull relevant OS details for the socket.
      \par
-     *  Ip::Address allocated objects MUST be destructed by Ip::Address::FreeAddrInfo
+     *  Ip::Address allocated objects MUST be destructed by Ip::Address::FreeAddr
      *  System getaddrinfo() allocated objects MUST be freed with system freeaddrinfo()
      *
      \param ai structure to be filled out.
@@ -273,7 +273,7 @@ public:
     /**
      *  Equivalent to the sysem call freeaddrinfo() but for Ip::Address allocated data
      */
-    static void FreeAddrInfo(struct addrinfo *&ai);
+    static void FreeAddr(struct addrinfo *&ai);
 
     /**
      *  Initializes an empty addrinfo properly for use.
@@ -281,7 +281,7 @@ public:
      *  about to be changed and the stored details may not match the new ones coming.
      \param ai addrinfo struct to be initialized as AF_UNSPEC with large address buffer
      */
-    static void InitAddrInfo(struct addrinfo *&ai);
+    static void InitAddr(struct addrinfo *&ai);
 
     /**
      *  Lookup a Host by Name. Equivalent to system call gethostbyname(char*)
index 59147f9a87294e950aac4691927dcd630443cc7c..182963cbc8bec8338bb9f9ff1bfb48a99fd4da7e 100644 (file)
@@ -713,7 +713,7 @@ testIpAddress::testAddrInfo()
     CPPUNIT_ASSERT( memcmp( expect->ai_addr, ipval->ai_addr, expect->ai_addrlen ) == 0 );
 
     freeaddrinfo(expect);
-    Ip::Address::FreeAddrInfo(ipval);
+    Ip::Address::FreeAddr(ipval);
 }
 
 void
index 8da31cb3ec1e8b599f8386309ddb8d1d90acf088..0b6ecc0db143753b7eb12e9adc8e8d9a1060d4b6 100644 (file)
@@ -183,10 +183,10 @@ ipcCreate(int type, const char *prog, const char *const args[], const char *name
     debugs(54, 3, "ipcCreate: cwfd FD " << cwfd);
 
     if (type == IPC_TCP_SOCKET || type == IPC_UDP_SOCKET) {
-        Ip::Address::InitAddrInfo(AI);
+        Ip::Address::InitAddr(AI);
 
         if (getsockname(pwfd, AI->ai_addr, &AI->ai_addrlen) < 0) {
-            Ip::Address::FreeAddrInfo(AI);
+            Ip::Address::FreeAddr(AI);
             debugs(54, DBG_CRITICAL, "ipcCreate: getsockname: " << xstrerror());
             return ipcCloseAllFD(prfd, pwfd, crfd, cwfd);
         }
@@ -195,19 +195,19 @@ ipcCreate(int type, const char *prog, const char *const args[], const char *name
 
         debugs(54, 3, "ipcCreate: FD " << pwfd << " sockaddr " << PaS);
 
-        Ip::Address::FreeAddrInfo(AI);
+        Ip::Address::FreeAddr(AI);
 
-        Ip::Address::InitAddrInfo(AI);
+        Ip::Address::InitAddr(AI);
 
         if (getsockname(crfd, AI->ai_addr, &AI->ai_addrlen) < 0) {
-            Ip::Address::FreeAddrInfo(AI);
+            Ip::Address::FreeAddr(AI);
             debugs(54, DBG_CRITICAL, "ipcCreate: getsockname: " << xstrerror());
             return ipcCloseAllFD(prfd, pwfd, crfd, cwfd);
         }
 
         ChS = *AI;
 
-        Ip::Address::FreeAddrInfo(AI);
+        Ip::Address::FreeAddr(AI);
 
         debugs(54, 3, "ipcCreate: FD " << crfd << " sockaddr " << ChS );
 
index ecda01edd2c2919a5f5d0cab8e0529c762d50713..481f7b956eb93ce2eec9f1249bfe77aeebd6bf48 100644 (file)
@@ -152,7 +152,7 @@ void Ipc::SharedListenJoined(const SharedListenResponse &response)
         AI->ai_socktype = p.sock_type;
         AI->ai_protocol = p.proto;
         comm_import_opened(cbd->conn, FdNote(p.fdNote), AI);
-        Ip::Address::FreeAddrInfo(AI);
+        Ip::Address::FreeAddr(AI);
     }
 
     cbd->errNo = response.errNo;
index 64be8c12a8b8601d042f7898cda6823a9ef1fc30..393d46b41fef0f461c3e59487278161f3c95548a 100644 (file)
@@ -202,7 +202,7 @@ Ipc::ImportFdIntoComm(const Comm::ConnectionPointer &conn, int socktype, int pro
         addr_info->ai_socktype = socktype;
         addr_info->ai_protocol = protocol;
         comm_import_opened(conn, Ipc::FdNote(noteId), addr_info);
-        Ip::Address::FreeAddrInfo(addr_info);
+        Ip::Address::FreeAddr(addr_info);
     } else {
         debugs(54, DBG_CRITICAL, "ERROR: Ipc::ImportFdIntoComm: " << conn << ' ' << xstrerror());
         conn->close();
index 34fde64ee3a8c364eaa27aa72165e0ebcee0e1c6..729407be38402bc9280896ccfc2acdf73d0ff9b3 100644 (file)
@@ -180,30 +180,30 @@ ipcCreate(int type, const char *prog, const char *const args[], const char *name
 // AYJ: these flags should be neutral, but if not IPv6 version needs adding
     if (type == IPC_TCP_SOCKET || type == IPC_UDP_SOCKET) {
 
-        Ip::Address::InitAddrInfo(aiPS);
+        Ip::Address::InitAddr(aiPS);
 
         if (getsockname(pwfd, aiPS->ai_addr, &(aiPS->ai_addrlen) ) < 0) {
             debugs(54, DBG_CRITICAL, "ipcCreate: getsockname: " << xstrerror());
-            Ip::Address::FreeAddrInfo(aiPS);
+            Ip::Address::FreeAddr(aiPS);
             return ipcCloseAllFD(prfd, pwfd, crfd, cwfd);
         }
 
         tmp_addr = *aiPS;
-        Ip::Address::FreeAddrInfo(aiPS);
+        Ip::Address::FreeAddr(aiPS);
 
         debugs(54, 3, "ipcCreate: FD " << pwfd << " sockaddr " << tmp_addr );
 
-        Ip::Address::InitAddrInfo(aiCS);
+        Ip::Address::InitAddr(aiCS);
 
         if (getsockname(crfd, aiCS->ai_addr, &(aiCS->ai_addrlen) ) < 0) {
             debugs(54, DBG_CRITICAL, "ipcCreate: getsockname: " << xstrerror());
-            Ip::Address::FreeAddrInfo(aiCS);
+            Ip::Address::FreeAddr(aiCS);
             return ipcCloseAllFD(prfd, pwfd, crfd, cwfd);
         }
 
         tmp_addr.setEmpty();
         tmp_addr = *aiCS;
-        Ip::Address::FreeAddrInfo(aiCS);
+        Ip::Address::FreeAddr(aiCS);
 
         debugs(54, 3, "ipcCreate: FD " << crfd << " sockaddr " << tmp_addr );
     }
@@ -464,31 +464,31 @@ ipc_thread_1(void *in_params)
             goto cleanup;
         }
 
-        Ip::Address::InitAddrInfo(aiPS_ipc);
+        Ip::Address::InitAddr(aiPS_ipc);
 
         if (getsockname(pwfd_ipc, aiPS_ipc->ai_addr, &(aiPS_ipc->ai_addrlen)) < 0) {
             debugs(54, DBG_CRITICAL, "ipcCreate: getsockname: " << xstrerror());
             ipcSend(cwfd, err_string, strlen(err_string));
-            Ip::Address::FreeAddrInfo(aiPS_ipc);
+            Ip::Address::FreeAddr(aiPS_ipc);
             goto cleanup;
         }
 
         PS_ipc = *aiPS_ipc;
-        Ip::Address::FreeAddrInfo(aiPS_ipc);
+        Ip::Address::FreeAddr(aiPS_ipc);
 
         debugs(54, 3, "ipcCreate: FD " << pwfd_ipc << " sockaddr " << PS_ipc);
 
-        Ip::Address::InitAddrInfo(aiCS_ipc);
+        Ip::Address::InitAddr(aiCS_ipc);
 
         if (getsockname(crfd_ipc, aiCS_ipc->ai_addr, &(aiCS_ipc->ai_addrlen)) < 0) {
             debugs(54, DBG_CRITICAL, "ipcCreate: getsockname: " << xstrerror());
             ipcSend(cwfd, err_string, strlen(err_string));
-            Ip::Address::FreeAddrInfo(aiCS_ipc);
+            Ip::Address::FreeAddr(aiCS_ipc);
             goto cleanup;
         }
 
         CS_ipc = *aiCS_ipc;
-        Ip::Address::FreeAddrInfo(aiCS_ipc);
+        Ip::Address::FreeAddr(aiCS_ipc);
 
         debugs(54, 3, "ipcCreate: FD " << crfd_ipc << " sockaddr " << CS_ipc);
 
index 83e9cb4e6c6a361ddc07131629e3fbc4cb3b62ea..178102de762399a1e2c61e45b1eec290233c55be 100644 (file)
@@ -481,13 +481,13 @@ getMyHostname(void)
 
             present = 1;
 
-            Ip::Address::FreeAddrInfo(AI);
+            Ip::Address::FreeAddr(AI);
 
             if (strchr(host, '.'))
                 return host;
         }
 
-        Ip::Address::FreeAddrInfo(AI);
+        Ip::Address::FreeAddr(AI);
         debugs(50, 2, "WARNING: failed to resolve " << sa << " to a fully qualified hostname");
     }
 
index b852f11f182be09e50514bca4e7e29053f7dac6e..c77df831efef14f86310045f2ad808383e5c3490 100644 (file)
@@ -822,7 +822,7 @@ process_request(cachemgr_request * req)
 #endif
         snprintf(buf, sizeof(buf), "socket: %s\n", xstrerror());
         error_html(buf);
-        Ip::Address::FreeAddrInfo(AI);
+        Ip::Address::FreeAddr(AI);
         return 1;
     }
 
@@ -831,12 +831,12 @@ process_request(cachemgr_request * req)
                  S.toUrl(ipbuf,MAX_IPSTRLEN),
                  xstrerror());
         error_html(buf);
-        Ip::Address::FreeAddrInfo(AI);
+        Ip::Address::FreeAddr(AI);
         close(s);
         return 1;
     }
 
-    Ip::Address::FreeAddrInfo(AI);
+    Ip::Address::FreeAddr(AI);
 
     l = snprintf(buf, sizeof(buf),
                  "GET cache_object://%s/%s%s%s HTTP/1.0\r\n"
index 1abeada100a9730dd4327adebac107533a6accf3..ac18f8fa6b5d0facbaf6844964a443e6914dd1bb 100644 (file)
@@ -139,7 +139,7 @@ client_comm_bind(int sock, const Ip::Address &addr)
     static struct addrinfo *AI = NULL;
     addr.getAddrInfo(AI);
     int res = bind(sock, AI->ai_addr, AI->ai_addrlen);
-    Ip::Address::FreeAddrInfo(AI);
+    Ip::Address::FreeAddr(AI);
     return res;
 }
 
@@ -168,10 +168,10 @@ resolveDestination(Ip::Address &iaddr)
     iaddr.getAddrInfo(AI);
     if ((conn = socket(AI->ai_family, AI->ai_socktype, 0)) < 0) {
         std::cerr << "ERROR: could not open socket to " << iaddr << std::endl;
-        Ip::Address::FreeAddrInfo(AI);
+        Ip::Address::FreeAddr(AI);
         exit(1);
     }
-    Ip::Address::FreeAddrInfo(AI);
+    Ip::Address::FreeAddr(AI);
 
     if (Transport::Config.localHost) {
         if (client_comm_bind(conn, iaddr) < 0) {
@@ -199,7 +199,7 @@ client_comm_connect(int sock, const Ip::Address &addr)
     static struct addrinfo *AI = NULL;
     addr.getAddrInfo(AI);
     int res = connect(sock, AI->ai_addr, AI->ai_addrlen);
-    Ip::Address::FreeAddrInfo(AI);
+    Ip::Address::FreeAddr(AI);
     Ping::TimerStart();
     return res;
 }