mirror of
https://github.com/osmarks/ngircd.git
synced 2025-02-04 11:29:10 +00:00
Output connection status when dumping the internal server state
This commit is contained in:
parent
cd954ee7e9
commit
3600dc60fc
@ -2184,4 +2184,28 @@ Conn_UsesSSL(CONN_ID Idx)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
|
|
||||||
|
GLOBAL void
|
||||||
|
Conn_DebugDump(void)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
Log(LOG_DEBUG, "Connection status:");
|
||||||
|
for (i = 0; i < Pool_Size; i++) {
|
||||||
|
if (My_Connections[i].sock == NONE)
|
||||||
|
continue;
|
||||||
|
Log(LOG_DEBUG,
|
||||||
|
" - %d: host=%s, lastdata=%ld, lastping=%ld, delaytime=%ld, flag=%d, options=%d, bps=%d, client=%s",
|
||||||
|
My_Connections[i].sock, My_Connections[i].host,
|
||||||
|
My_Connections[i].lastdata, My_Connections[i].lastping,
|
||||||
|
My_Connections[i].delaytime, My_Connections[i].flag,
|
||||||
|
My_Connections[i].options, My_Connections[i].bps,
|
||||||
|
My_Connections[i].client ? Client_ID(My_Connections[i].client) : "-");
|
||||||
|
}
|
||||||
|
} /* Conn_DumpClients */
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* -eof- */
|
/* -eof- */
|
||||||
|
@ -129,6 +129,10 @@ GLOBAL long Conn_Count PARAMS((void));
|
|||||||
GLOBAL long Conn_CountMax PARAMS((void));
|
GLOBAL long Conn_CountMax PARAMS((void));
|
||||||
GLOBAL long Conn_CountAccepted PARAMS((void));
|
GLOBAL long Conn_CountAccepted PARAMS((void));
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
|
GLOBAL void Conn_DebugDump PARAMS((void));
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -46,6 +46,7 @@ Dump_State(void)
|
|||||||
Client_ID(Client_ThisServer()));
|
Client_ID(Client_ThisServer()));
|
||||||
Log(LOG_DEBUG, "time()=%ld", time(NULL));
|
Log(LOG_DEBUG, "time()=%ld", time(NULL));
|
||||||
Conf_DebugDump();
|
Conf_DebugDump();
|
||||||
|
Conn_DebugDump();
|
||||||
Client_DebugDump();
|
Client_DebugDump();
|
||||||
Log(LOG_DEBUG, "--- End of state dump ---");
|
Log(LOG_DEBUG, "--- End of state dump ---");
|
||||||
} /* Dump_State */
|
} /* Dump_State */
|
||||||
|
Loading…
Reference in New Issue
Block a user