From 67129385362edc396bd495dfec4c9fb170d16ecc Mon Sep 17 00:00:00 2001 From: wessels <> Date: Tue, 10 Feb 1998 02:05:06 +0000 Subject: [PATCH] don't use ntohl() etc on ICP shostid field --- src/icp_v2.cc | 6 +++--- src/icp_v3.cc | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/icp_v2.cc b/src/icp_v2.cc index 47f3051487..ef919a40fc 100644 --- a/src/icp_v2.cc +++ b/src/icp_v2.cc @@ -84,7 +84,7 @@ icpCreateMessage( headerp->reqnum = htonl(reqnum); headerp->flags = htonl(flags); headerp->pad = htonl(pad); - headerp->shostid = htonl(theOutICPAddr.s_addr); + headerp->shostid = theOutICPAddr.s_addr; urloffset = buf + sizeof(icp_common_t); if (opcode == ICP_QUERY) urloffset += sizeof(u_num32); @@ -146,7 +146,7 @@ icpHandleIcpV2(int fd, struct sockaddr_in from, char *buf, int len) header.length = ntohs(headerp->length); header.reqnum = ntohl(headerp->reqnum); header.flags = ntohl(headerp->flags); - header.shostid = ntohl(headerp->shostid); + header.shostid = headerp->shostid; header.pad = ntohl(headerp->pad); switch (header.opcode) { @@ -266,7 +266,7 @@ icpPktDump(icp_common_t * pkt) debug(12, 9) ("length: %-8d\n", (int) ntohs(pkt->length)); debug(12, 9) ("reqnum: %-8d\n", ntohl(pkt->reqnum)); debug(12, 9) ("flags: %-8x\n", ntohl(pkt->flags)); - a.s_addr = ntohl(pkt->shostid); + a.s_addr = pkt->shostid; debug(12, 9) ("shostid: %s\n", inet_ntoa(a)); debug(12, 9) ("payload: %s\n", (char *) pkt + sizeof(icp_common_t)); } diff --git a/src/icp_v3.cc b/src/icp_v3.cc index 5bcd1e1ee2..037b595830 100644 --- a/src/icp_v3.cc +++ b/src/icp_v3.cc @@ -19,7 +19,7 @@ icpHandleIcpV3(int fd, struct sockaddr_in from, char *buf, int len) header.length = ntohs(headerp->length); header.reqnum = ntohl(headerp->reqnum); header.flags = ntohl(headerp->flags); - header.shostid = ntohl(headerp->shostid); + header.shostid = headerp->shostid; switch (header.opcode) { case ICP_QUERY: -- 2.47.2