From 664139efcf141d658d5b9f85ea3d1211049aa55a Mon Sep 17 00:00:00 2001 From: zico Date: Mon, 22 Apr 2013 11:42:38 +0200 Subject: [PATCH] Clear Netgame struct each time player enters a new IP in manual join menu --- CHANGELOG.txt | 2 +- main/net_udp.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 3479d2217..f744fc9c7 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -2,7 +2,7 @@ D1X-Rebirth Changelog 20130422 -------- -main/net_udp.c: In restricted game mode check for player callsign and sockaddr at the same time +main/net_udp.c: In restricted game mode check for player callsign and sockaddr at the same time; Clear Netgame struct each time player enters a new IP in manual join menu 20130418 -------- diff --git a/main/net_udp.c b/main/net_udp.c index a245964c0..01ef9ccfa 100644 --- a/main/net_udp.c +++ b/main/net_udp.c @@ -596,6 +596,8 @@ static int manual_join_game_handler(newmenu *menu, d_event *event, direct_join * case EVENT_NEWMENU_SELECTED: { int sockres = -1; + + net_udp_init(); // yes, redundant call but since the menu does not know any better it would allow any IP entry as long as Netgame-entry looks okay... my head hurts... if ((atoi(UDP_MyPort)) <= 1024 ||(atoi(UDP_MyPort)) > 65535) {