Commit Diff


commit - cd954ee7e902743cd679b418edf1630225c512c4
commit + 3600dc60fc54e4317b04ca5896515cf9913910c0
blob - e4851a933b42950b5b0cfcd7022a8403cc345057
blob + d74f2511e4414e97a38a9d4f4a45fa9cdd518b58
--- src/ngircd/conn.c
+++ src/ngircd/conn.c
@@ -2180,6 +2180,30 @@ Conn_UsesSSL(CONN_ID Idx)
 	assert(Idx < (int) array_length(&My_ConnArray, sizeof(CONNECTION)));
 	return Conn_OPTION_ISSET(&My_Connections[Idx], CONN_SSL);
 }
+
+#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
 
blob - a0bddaac95d090735bf652e3d3829e9436c4a376
blob + 1e938ada5578794f065ad81ffa130d507937184d
--- src/ngircd/conn.h
+++ src/ngircd/conn.h
@@ -129,7 +129,11 @@ GLOBAL long Conn_Count PARAMS((void));
 GLOBAL long Conn_CountMax PARAMS((void));
 GLOBAL long Conn_CountAccepted PARAMS((void));
 
+#ifdef DEBUG
+GLOBAL void Conn_DebugDump PARAMS((void));
 #endif
 
+#endif
 
+
 /* -eof- */
blob - cb12a84ddeee42dee71d88d9961a205ff44e7ca2
blob + 57bf80f58de384fda219f8167026282cc3cfa5d5
--- src/ngircd/sighandlers.c
+++ src/ngircd/sighandlers.c
@@ -46,6 +46,7 @@ Dump_State(void)
 	    Client_ID(Client_ThisServer()));
 	Log(LOG_DEBUG, "time()=%ld", time(NULL));
 	Conf_DebugDump();
+	Conn_DebugDump();
 	Client_DebugDump();
 	Log(LOG_DEBUG, "--- End of state dump ---");
 } /* Dump_State */