mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-18 09:51:40 +00:00
Some more nq networking debug prints.
This commit is contained in:
parent
3898f5fd5c
commit
6f0ab844ea
3 changed files with 8 additions and 0 deletions
|
@ -491,6 +491,7 @@ NET_Close (qsocket_t *sock)
|
||||||
// call the driver_Close function
|
// call the driver_Close function
|
||||||
sfunc.Close (sock);
|
sfunc.Close (sock);
|
||||||
|
|
||||||
|
Sys_MaskPrintf (SYS_NET, "closing socket\n");
|
||||||
NET_FreeQSocket (sock);
|
NET_FreeQSocket (sock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -524,6 +525,7 @@ NET_GetMessage (qsocket_t *sock)
|
||||||
// see if this connection has timed out
|
// see if this connection has timed out
|
||||||
if (ret == 0 && sock->driver) {
|
if (ret == 0 && sock->driver) {
|
||||||
if (net_time - sock->lastMessageTime > net_messagetimeout->value) {
|
if (net_time - sock->lastMessageTime > net_messagetimeout->value) {
|
||||||
|
Sys_MaskPrintf (SYS_NET, "socket timed out\n");
|
||||||
NET_Close (sock);
|
NET_Close (sock);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1025,6 +1025,8 @@ _Datagram_CheckNewConnections (void)
|
||||||
}
|
}
|
||||||
// it's somebody coming back in from a crash/disconnect
|
// it's somebody coming back in from a crash/disconnect
|
||||||
// so close the old qsocket and let their retry get them back in
|
// so close the old qsocket and let their retry get them back in
|
||||||
|
Sys_MaskPrintf (SYS_NET, "closing stale socket %d %g\n", ret,
|
||||||
|
net_time - s->connecttime);
|
||||||
NET_Close (s);
|
NET_Close (s);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -1050,11 +1052,13 @@ _Datagram_CheckNewConnections (void)
|
||||||
// allocate a network socket
|
// allocate a network socket
|
||||||
newsock = dfunc.OpenSocket (0);
|
newsock = dfunc.OpenSocket (0);
|
||||||
if (newsock == -1) {
|
if (newsock == -1) {
|
||||||
|
Sys_MaskPrintf (SYS_NET, "failed to open socket");
|
||||||
NET_FreeQSocket (sock);
|
NET_FreeQSocket (sock);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
// connect to the client
|
// connect to the client
|
||||||
if (dfunc.Connect (newsock, &clientaddr) == -1) {
|
if (dfunc.Connect (newsock, &clientaddr) == -1) {
|
||||||
|
Sys_MaskPrintf (SYS_NET, "failed to connect client");
|
||||||
dfunc.CloseSocket (newsock);
|
dfunc.CloseSocket (newsock);
|
||||||
NET_FreeQSocket (sock);
|
NET_FreeQSocket (sock);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -1361,6 +1365,7 @@ _Datagram_Connect (const char *host)
|
||||||
|
|
||||||
ErrorReturn:
|
ErrorReturn:
|
||||||
// FIXME: MENUCODE - do something with reason
|
// FIXME: MENUCODE - do something with reason
|
||||||
|
Sys_MaskPrintf (SYS_NET, "FIXME: MENUCODE - do something with reason\n");
|
||||||
NET_FreeQSocket (sock);
|
NET_FreeQSocket (sock);
|
||||||
ErrorReturn2:
|
ErrorReturn2:
|
||||||
dfunc.CloseSocket (newsock);
|
dfunc.CloseSocket (newsock);
|
||||||
|
|
|
@ -432,6 +432,7 @@ SV_DropClient (qboolean crash)
|
||||||
Sys_Printf ("Client %s removed\n", host_client->name);
|
Sys_Printf ("Client %s removed\n", host_client->name);
|
||||||
}
|
}
|
||||||
// break the net connection
|
// break the net connection
|
||||||
|
Sys_MaskPrintf (SYS_NET, "dropping client\n");
|
||||||
NET_Close (host_client->netconnection);
|
NET_Close (host_client->netconnection);
|
||||||
host_client->netconnection = NULL;
|
host_client->netconnection = NULL;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue