From bad19ec55359c5fac14077d5c9e85d25006e1de4 Mon Sep 17 00:00:00 2001 From: Bradley Bell Date: Sat, 11 Oct 2003 02:36:21 +0000 Subject: [PATCH] fixed stupid win32 network bug --- ChangeLog | 4 ++++ arch/win32/winnet.c | 25 +++++++++++++++---------- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 160ca6a5..5b96a3b9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2003-10-10 Bradley Bell + + * arch/win32/winnet.c: fixed stupid win32 network bug + 2003-10-10 Bradley Bell * main/piggy.c: increased D1_MAX_TMAP_NUM diff --git a/arch/win32/winnet.c b/arch/win32/winnet.c index c796ecd6..dfcbba8c 100644 --- a/arch/win32/winnet.c +++ b/arch/win32/winnet.c @@ -1,4 +1,4 @@ -/* $Id: winnet.c,v 1.8 2003-10-05 22:27:01 btb Exp $ */ +/* $Id: winnet.c,v 1.9 2003-10-11 02:36:21 btb Exp $ */ /* THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO @@ -148,24 +148,29 @@ int ipx_get_packet_data( ubyte * data ) { struct ipx_recv_data rd; char buf[MAX_IPX_DATA]; - uint best_id = 0; - uint pkt_num; +//killed 6-15-99 to get rid of compile warnings - OE +// uint best_id = 0; +// uint pkt_num; +//end kill - OE int size; int best_size = 0; - - // Like the original, only take latest packet, throw away rest +//edited 04/12/99 Matt Mueller - duh, we don't want to throw all that data away! + //--killed-- Like the original, only take latest packet, throw away rest + //do _NOT_ throw them away! while (driver->PacketReady(&ipx_socket_data)) { if ((size = driver->ReceivePacket(&ipx_socket_data, buf, sizeof(buf), &rd)) > 4) { if (!memcmp(rd.src_network, ipx_MyAddress, 10)) continue; /* don't get own pkts */ - pkt_num = *(uint *)buf; - if (pkt_num >= best_id) { +//--killed-- pkt_num = *(uint *)buf; +//--killed-- if (pkt_num >= best_id) { memcpy(data, buf + 4, size - 4); - best_id = pkt_num; - best_size = size - 4; - } + return size-4; +//--killed-- best_id = pkt_num; +//--killed-- best_size = size - 4; +//--killed-- } +//end edit -MM } } return best_size; -- 2.39.2