From e9442ddb0d0993ce3cafb8687f1fb4f9119aaf2d Mon Sep 17 00:00:00 2001 From: havoc Date: Sun, 10 Dec 2006 13:30:16 +0000 Subject: [PATCH] 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 --- netconn.c | 6 ++++++ 1 file changed, 6 insertions(+) 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; } } -- 2.39.2