From: havoc Date: Sun, 10 Dec 2006 13:30:16 +0000 (+0000) Subject: fix crash when a client reconnects to the same client slot, thanks to div0 for report... X-Git-Tag: xonotic-v0.1.0preview~3757 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e9442ddb0d0993ce3cafb8687f1fb4f9119aaf2d;p=xonotic%2Fdarkplaces.git fix crash when a client reconnects to the same client slot, thanks to div0 for reporting and investigating this bug git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6643 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/netconn.c b/netconn.c index d876b929..8f31e4e8 100755 --- a/netconn.c +++ b/netconn.c @@ -1893,7 +1893,9 @@ static int NetConn_ServerParsePacket(lhnetsocket_t *mysocket, unsigned char *dat if (developer.integer >= 10) Con_Printf("Datagram_ParseConnectionless: sending \"accept\" to %s.\n", addressstring2); NetConn_WriteString(mysocket, "\377\377\377\377accept", peeraddress); + SV_VM_Begin(); SV_SendServerinfo(client); + SV_VM_End(); } else { @@ -2078,7 +2080,11 @@ static int NetConn_ServerParsePacket(lhnetsocket_t *mysocket, unsigned char *dat // if client is already spawned, re-send the // serverinfo message as they'll need it to play if (client->spawned) + { + SV_VM_Begin(); SV_SendServerinfo(client); + SV_VM_End(); + } return true; } }