From 9b4ae4022e62e31306e38cf756201f340fbbf2f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=A1vio=20J=2E=20Saraiva?= Date: Sat, 5 Oct 2024 15:17:25 +0100 Subject: [PATCH] Fix packet size of netio_tcp_send/netio_tcp_recv. Fixes #244 --- common/net_io.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/net_io.c b/common/net_io.c index e68c965a3..526a16232 100644 --- a/common/net_io.c +++ b/common/net_io.c @@ -721,7 +721,7 @@ static void netio_tcp_free(netio_inet_desc_t *nid) */ static ssize_t netio_tcp_send(netio_inet_desc_t *nid,void *pkt,size_t pkt_len) { - u_long l = htonl(pkt_len); + m_uint32_t l = htonl(pkt_len); if (write(nid->fd,&l,sizeof(l)) == -1) return(-1); @@ -731,7 +731,7 @@ static ssize_t netio_tcp_send(netio_inet_desc_t *nid,void *pkt,size_t pkt_len) static ssize_t netio_tcp_recv(netio_inet_desc_t *nid,void *pkt,size_t max_len) { - u_long l; + m_uint32_t l; if (read(nid->fd,&l,sizeof(l)) != sizeof(l)) return(-1);