From 2d1187b28745a6c5d114de589beb9ab0d42695ef Mon Sep 17 00:00:00 2001 From: Thilo Schulz Date: Tue, 21 Jun 2011 13:31:19 +0000 Subject: [PATCH] - Clear ip address listings after a NET_Restart - check for oldGameSet instead of the gamename string --- code/client/cl_parse.c | 2 +- code/qcommon/net_ip.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/code/client/cl_parse.c b/code/client/cl_parse.c index 1f672198..b75b2d3a 100644 --- a/code/client/cl_parse.c +++ b/code/client/cl_parse.c @@ -533,7 +533,7 @@ void CL_ParseGamestate( msg_t *msg ) { CL_StopRecord_f(); // reinitialize the filesystem if the game directory has changed - if(FS_ConditionalRestart(clc.checksumFeed, qfalse) && !cls.oldGame[0]) + if(FS_ConditionalRestart(clc.checksumFeed, qfalse) && !cls.oldGameSet) { cls.oldGameSet = qtrue; Q_strncpyz(cls.oldGame, oldGame, sizeof(cls.oldGame)); diff --git a/code/qcommon/net_ip.c b/code/qcommon/net_ip.c index 7889726b..f6f45a25 100644 --- a/code/qcommon/net_ip.c +++ b/code/qcommon/net_ip.c @@ -1290,6 +1290,8 @@ static void NET_GetLocalAddress(void) { struct ifaddrs *ifap, *search; + numIP = 0; + if(getifaddrs(&ifap)) Com_Printf("NET_GetLocalAddress: Unable to get list of network interfaces: %s\n", NET_ErrorString()); else @@ -1312,6 +1314,8 @@ static void NET_GetLocalAddress( void ) { struct addrinfo hint; struct addrinfo *res = NULL; + numIP = 0; + if(gethostname( hostname, 256 ) == SOCKET_ERROR) return;