From d9bbc359a2804681c9d42ea239e8186fb0e11019 Mon Sep 17 00:00:00 2001 From: zicodxx Date: Thu, 21 Apr 2011 20:52:33 +0200 Subject: [PATCH] When leaving game and still sending extras, don't forget to update the timer so we won't get stuck in an infinite loop --- CHANGELOG.txt | 4 ++++ main/net_ipx.c | 3 +++ main/net_udp.c | 4 ++++ 3 files changed, 11 insertions(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index e78fddf79..99ad0d854 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,5 +1,9 @@ D2X-Rebirth Changelog +20110421 +-------- +main/net_ipx.c, main/net_udp.c: When leaving game and still sending extras, don't forget to update the timer so we won't get stuck in an infinite loop + 20110420 -------- main/multi.c, main/state.c: Resolved termination issue when reading and comparing callsigns fro Coop savestates; Added scores sending after Coop savestate loading as unrestored players will send them when loading new level diff --git a/main/net_ipx.c b/main/net_ipx.c index 525054a9f..aadbb02e4 100644 --- a/main/net_ipx.c +++ b/main/net_ipx.c @@ -4192,7 +4192,10 @@ void net_ipx_leave_game() if ((multi_i_am_master())) { while (Network_sending_extras>1 && Player_joining_extras!=-1) + { + timer_update(); net_ipx_send_extras(); + } Netgame.numplayers = 0; nsave=N_players; diff --git a/main/net_udp.c b/main/net_udp.c index 4bbcb787b..2a3f385c7 100644 --- a/main/net_udp.c +++ b/main/net_udp.c @@ -3409,6 +3409,7 @@ void net_udp_read_sync_packet( ubyte * data, int data_len, struct _sockaddr send if (Netgame.segments_checksum != my_segments_checksum) { Network_status = NETSTAT_MENU; + net_udp_close(); nm_messagebox(TXT_ERROR, 1, TXT_OK, TXT_NETLEVEL_NMATCH); #ifdef RELEASE return; @@ -4035,7 +4036,10 @@ void net_udp_leave_game() if ((multi_i_am_master())) { while (Network_sending_extras>1 && Player_joining_extras!=-1) + { + timer_update(); net_udp_send_extras(); + } Netgame.numplayers = 0; nsave=N_players;