removed deadsocket field from server client struct, changed connect handling to resen...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 16 May 2005 03:14:49 +0000 (03:14 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 16 May 2005 03:14:49 +0000 (03:14 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5305 d7cf8633-e32d-0410-b094-e92efae38249

netconn.c
server.h
sv_main.c

index afd1b0e..767e9da 100755 (executable)
--- 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
                                                        {
index 5439f50..91fc3b8 100644 (file)
--- 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;
index c330e94..74d9da5 100644 (file)
--- 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;