--------------------- PatchSet 4372 Date: 2007/04/25 05:37:53 Author: amosjeffries Branch: squid3-ipv6 Tag: (none) Log: drop a magic number Members: src/comm.cc:1.47.2.17->1.47.2.18 src/fde.h:1.7.8.2->1.7.8.3 Index: squid3/src/comm.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/comm.cc,v retrieving revision 1.47.2.17 retrieving revision 1.47.2.18 diff -u -r1.47.2.17 -r1.47.2.18 --- squid3/src/comm.cc 9 Apr 2007 14:10:45 -0000 1.47.2.17 +++ squid3/src/comm.cc 25 Apr 2007 05:37:53 -0000 1.47.2.18 @@ -1,6 +1,6 @@ /* - * $Id: comm.cc,v 1.47.2.17 2007/04/09 14:10:45 amosjeffries Exp $ + * $Id: comm.cc,v 1.47.2.18 2007/04/25 05:37:53 amosjeffries Exp $ * * DEBUG: section 5 Socket Functions * AUTHOR: Harvest Derived @@ -1323,8 +1323,7 @@ else return COMM_ERROR; - /* FIXME INET6 : magic 16 will cause problems in IPv6. Try MAX_IPSTRLEN instead. */ - address.NtoA(F->ipaddr, 16); + address.NtoA(F->ipaddr, MAX_IPSTRLEN); F->remote_port = address.GetPort(); /* remote_port is HS */ Index: squid3/src/fde.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/fde.h,v retrieving revision 1.7.8.2 retrieving revision 1.7.8.3 diff -u -r1.7.8.2 -r1.7.8.3 --- squid3/src/fde.h 5 Jan 2007 16:59:19 -0000 1.7.8.2 +++ squid3/src/fde.h 25 Apr 2007 05:37:53 -0000 1.7.8.3 @@ -1,6 +1,6 @@ /* - * $Id: fde.h,v 1.7.8.2 2007/01/05 16:59:19 hno Exp $ + * $Id: fde.h,v 1.7.8.3 2007/04/25 05:37:53 amosjeffries Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -55,7 +55,7 @@ struct IN_ADDR local_addr; unsigned char tos; - char ipaddr[16]; /* dotted decimal address of peer */ + char ipaddr[MAX_IPSTRLEN]; /* dotted decimal address of peer */ char desc[FD_DESC_SZ]; struct