From: havoc Date: Mon, 16 May 2005 03:14:49 +0000 (+0000) Subject: removed deadsocket field from server client struct, changed connect handling to resen... X-Git-Tag: xonotic-v0.1.0preview~4876 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=36dcd835df5b87aaa39431ace947865655cb36e5;p=xonotic%2Fdarkplaces.git removed deadsocket field from server client struct, changed connect handling to resend the serverinfo, but then disabled the reconnect handling entirely (so you can't reclaim your ghost) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5305 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/netconn.c b/netconn.c index afd1b0e0..767e9da9 100755 --- a/netconn.c +++ b/netconn.c @@ -1321,7 +1321,6 @@ int NetConn_ServerParsePacket(lhnetsocket_t *mysocket, qbyte *data, int length, SV_SendServerinfo(client); //host_client = client; //SV_DropClient (true); - //client->deadsocket = true; } // else ignore them } @@ -1453,13 +1452,17 @@ int NetConn_ServerParsePacket(lhnetsocket_t *mysocket, qbyte *data, int length, NetConn_Write(mysocket, net_message.data, net_message.cursize, peeraddress); SZ_Clear(&net_message); } +#if 0 else if (realtime - client->netconnection->lastMessageTime >= net_messagerejointimeout.value) { + SV_SendServerinfo(client); // the old client hasn't sent us anything // in quite a while, so kick off and let // the retry take care of it... - client->deadsocket = true; + //host_client = client; + //SV_DropClient (true); } +#endif } else { diff --git a/server.h b/server.h index 5439f506..91fc3b87 100644 --- a/server.h +++ b/server.h @@ -121,8 +121,6 @@ typedef struct client_s qboolean dropasap; // only valid before spawned qboolean sendsignon; - // remove this client immediately - qboolean deadsocket; // requested rate in bytes per second int rate; diff --git a/sv_main.c b/sv_main.c index c330e94b..74d9da50 100644 --- a/sv_main.c +++ b/sv_main.c @@ -317,6 +317,7 @@ void SV_SendServerinfo (client_t *client) if (sv.protocol == PROTOCOL_DARKPLACES5 || sv.protocol == PROTOCOL_DARKPLACES6) client->entitydatabase5 = EntityFrame5_AllocDatabase(sv_mempool); + SZ_Clear (&client->message); MSG_WriteByte (&client->message, svc_print); dpsnprintf (message, sizeof (message), "\002\nServer: %s build %s (progs %i crc)", gamename, buildstring, pr_crc); MSG_WriteString (&client->message,message); @@ -1264,7 +1265,7 @@ void SV_SendClientMessages (void) continue; } - if (host_client->deadsocket || host_client->message.overflowed) + if (host_client->message.overflowed) { SV_DropClient (true); // if the message couldn't send, kick off continue;