From 54bcc9c37bd9a36606c2378c63dbb1436f34752c Mon Sep 17 00:00:00 2001 From: Eric Faurot Date: Thu, 4 Jun 2009 18:34:34 +0000 Subject: revert previous commit for now since it won't play well with snmpd. ok pyr@ --- usr.sbin/relayd/imsg.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/usr.sbin/relayd/imsg.c b/usr.sbin/relayd/imsg.c index a0a915c6f36..9e1a8792799 100644 --- a/usr.sbin/relayd/imsg.c +++ b/usr.sbin/relayd/imsg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: imsg.c,v 1.17 2009/06/04 17:51:38 eric Exp $ */ +/* $OpenBSD: imsg.c,v 1.18 2009/06/04 18:34:33 eric Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer @@ -103,9 +103,6 @@ imsg_get(struct imsgbuf *ibuf, struct imsg *imsg) return (0); memcpy(&imsg->hdr, ibuf->r.buf, sizeof(imsg->hdr)); - imsg->hdr.type = ntohs(imsg->hdr.type); - imsg->hdr.len = ntohs(imsg->hdr.len); - imsg->hdr.peerid = ntohl(imsg->hdr.peerid); if (imsg->hdr.len < IMSG_HEADER_SIZE || imsg->hdr.len > MAX_IMSGSIZE) { log_warnx("imsg_get: imsg hdr len %u out of bounds, type=%u", @@ -227,9 +224,7 @@ imsg_close(struct imsgbuf *ibuf, struct buf *msg) struct imsg_hdr *hdr; hdr = (struct imsg_hdr *)msg->buf; - hdr->type = htons(hdr->type); - hdr->len = htons(msg->wpos); - hdr->peerid = htonl(hdr->peerid); + hdr->len = (u_int16_t)msg->wpos; buf_close(&ibuf->w, msg); imsg_event_add(ibuf); -- cgit v1.2.3