--------------------- PatchSet 7460 Date: 2006/03/17 10:44:39 Author: hno Branch: wccp2-2_5 Tag: (none) Log: Eleminate (invalid) WCCP dependencies. Fix to compile cleanly on 64-bit Members: src/wccp2.c:1.1.2.1->1.1.2.2 Index: squid/src/wccp2.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/wccp2.c,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -r1.1.2.1 -r1.1.2.2 --- squid/src/wccp2.c 17 Mar 2006 10:32:26 -0000 1.1.2.1 +++ squid/src/wccp2.c 17 Mar 2006 10:44:39 -0000 1.1.2.2 @@ -1,6 +1,6 @@ /* - * $Id: wccp2.c,v 1.1.2.1 2006/03/17 10:32:26 hno Exp $ + * $Id: wccp2.c,v 1.1.2.2 2006/03/17 10:44:39 hno Exp $ * * DEBUG: section 80 WCCP Support * AUTHOR: Steven WIlton @@ -293,7 +293,7 @@ * wccp2ConnectionClose */ -void +static void wccp2InitServices(void) { struct wccp2_service_list_t *wccp2_service_list_ptr; @@ -557,7 +557,7 @@ { u_short port = WCCP_PORT; struct sockaddr_in router, local; - int local_len, router_len; + socklen_t local_len, router_len; struct wccp2_service_list_t *service_list_ptr; struct wccp2_router_list_t *router_list_ptr; @@ -571,7 +571,7 @@ Config.Wccp2.incoming, port, COMM_NONBLOCKING, - "WCCP Socket"); + "WCCP2 Socket"); if (theInWccp2Connection < 0) fatal("Cannot open WCCP Port"); commSetSelect(theInWccp2Connection, @@ -583,22 +583,20 @@ (int) port, theInWccp2Connection); if (Config.Wccp2.outgoing.s_addr != no_addr.s_addr) { - theOutWccpConnection = comm_open(SOCK_DGRAM, + theOutWccp2Connection = comm_open(SOCK_DGRAM, 0, Config.Wccp2.outgoing, port, COMM_NONBLOCKING, - "WCCP Socket"); - if (theOutWccpConnection < 0) + "WCCP2 Socket (outgoing)"); + if (theOutWccp2Connection < 0) fatal("Cannot open Outgoing WCCP Port"); - commSetSelect(theOutWccpConnection, + commSetSelect(theOutWccp2Connection, COMM_SELECT_READ, wccp2HandleUdp, NULL, 0); debug(80, 1) ("Outgoing WCCPv2 messages on port %d, FD %d.\n", - (int) port, theOutWccpConnection); - fd_note(theOutWccpConnection, "Outgoing WCCP socket"); - fd_note(theInWccpConnection, "Incoming WCCP socket"); + (int) port, theOutWccp2Connection); } else { @@ -621,9 +619,8 @@ memset(&local, '\0', local_len); if (getsockname(theOutWccp2Connection, (struct sockaddr *) &local, &local_len)) fatal("Unable to getsockname on WCCP out socket"); - local_ip.s_addr = local.sin_addr.s_addr; - router_list_ptr->local_ip=local_ip; + router_list_ptr->local_ip=local.sin_addr; /* Disconnect the sending socket */ router.sin_family = AF_UNSPEC; @@ -1016,7 +1013,7 @@ /* Set the cache id (ip) */ service_list_ptr->wccp2_identity_info_ptr->cache_identity.addr=router_list_ptr->local_ip; - debug(80,3) ("Sending HereIam packet size %d\n",service_list_ptr->wccp_packet_size); + debug(80,3) ("Sending HereIam packet size %d\n", (int)service_list_ptr->wccp_packet_size); /* Send the packet */ sendto(theOutWccp2Connection, &service_list_ptr->wccp_packet,