diff options
author | Thilo Schulz <arny@ats.s.bawue.de> | 2011-06-21 13:31:19 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-10 21:47:35 +0000 |
commit | 1e341b0725223328db7331f4b2bf2b905b34e352 (patch) | |
tree | 26c2c42147db05b40b87f70448a9bbdc3ededafc | |
parent | 49e79b120ab36b6835ceeb0a64d2930cdb8201e6 (diff) |
- Clear ip address listings after a NET_Restart - check for oldGameSet instead of the gamename string
-rw-r--r-- | src/client/cl_parse.c | 2 | ||||
-rw-r--r-- | src/qcommon/net_ip.c | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/client/cl_parse.c b/src/client/cl_parse.c index 03967927..7a75239e 100644 --- a/src/client/cl_parse.c +++ b/src/client/cl_parse.c @@ -530,7 +530,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/src/qcommon/net_ip.c b/src/qcommon/net_ip.c index d7dc8b5f..b6a158ce 100644 --- a/src/qcommon/net_ip.c +++ b/src/qcommon/net_ip.c @@ -1287,6 +1287,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 @@ -1309,6 +1311,8 @@ static void NET_GetLocalAddress( void ) { struct addrinfo hint; struct addrinfo *res = NULL; + numIP = 0; + if(gethostname( hostname, 256 ) == SOCKET_ERROR) return; |