Commit Diff


commit - 0999dc79076bf851e00bc8a071905f6d1f31efe4
commit + 33cec4efd9b00af2ec6113c2372508d2f388887a
blob - f3339d162fd5b48ad303c70ba7f8dc7c7fc6c15d
blob + 26faf74a4a66a79ea4c3b085942f177230041bf5
--- ChangeLog
+++ ChangeLog
@@ -12,6 +12,7 @@
 
 ngircd 0.8-CVS
 
+  - Added some more debug code ...
   - Fixed wrong variable names in output of "ngircd --configtest".
   - Debian: Fxied the name of the "default file" in the init script for
     ngircd-full packages. And do the test if the binary is executable after
@@ -538,4 +539,4 @@ ngIRCd 0.0.1, 31.12.2001
 
 
 -- 
-$Id: ChangeLog,v 1.233.2.8 2004/09/27 11:30:52 alex Exp $
+$Id: ChangeLog,v 1.233.2.9 2004/12/25 00:00:42 alex Exp $
blob - e4c3bf1c8db468f3e321c5f175f89e387bf12b86
blob + 052765c358ffa9f45c0dc3bf7105e400284da433
--- src/ngircd/conn.c
+++ src/ngircd/conn.c
@@ -16,7 +16,7 @@
 
 #include "portab.h"
 
-static char UNUSED id[] = "$Id: conn.c,v 1.134.2.2 2004/05/30 16:24:21 alex Exp $";
+static char UNUSED id[] = "$Id: conn.c,v 1.134.2.3 2004/12/25 00:00:42 alex Exp $";
 
 #include "imp.h"
 #include <assert.h>
@@ -628,6 +628,9 @@ Conn_Close( CONN_ID Idx, CHAR *LogMsg, CHAR *FwdMsg, B
 	{
 		/* Conn_Close() has been called recursively for this link;
 		 * probabe reason: Try_Write() failed  -- see below. */
+#ifdef DEBUG
+		Log( LOG_DEBUG, "Recursive request to close connection: %d", Idx );
+#endif
 		return;
 	}
 
@@ -723,6 +726,10 @@ Conn_Close( CONN_ID Idx, CHAR *LogMsg, CHAR *FwdMsg, B
 
 	/* Clean up connection structure (=free it) */
 	Init_Conn_Struct( Idx );
+
+#ifdef DEBUG
+	Log( LOG_DEBUG, "Shutdown of connection %d completed.", Idx );
+#endif
 } /* Conn_Close */
 
 
@@ -1272,22 +1279,20 @@ Handle_Buffer( CONN_ID Idx )
 				/* Mit dem letzten Befehl wurde Socket-Kompression aktiviert.
 				 * Evtl. schon vom Socket gelesene Daten in den Unzip-Puffer
 				 * umkopieren, damit diese nun zunaechst entkomprimiert werden */
-				{
-					if( My_Connections[Idx].rdatalen > ZREADBUFFER_LEN )
-					{
-						/* Hupsa! Soviel Platz haben wir aber gar nicht! */
-						Log( LOG_ALERT, "Can't move read buffer: No space left in unzip buffer (need %d bytes)!", My_Connections[Idx].rdatalen );
-						return FALSE;
-					}
-					memcpy( My_Connections[Idx].zip.rbuf, My_Connections[Idx].rbuf, My_Connections[Idx].rdatalen );
-					My_Connections[Idx].zip.rdatalen = My_Connections[Idx].rdatalen;
-					My_Connections[Idx].rdatalen = 0;
-#ifdef DEBUG
-					Log( LOG_DEBUG, "Moved already received data (%d bytes) to uncompression buffer.", My_Connections[Idx].zip.rdatalen );
-#endif
+				if( My_Connections[Idx].rdatalen > ZREADBUFFER_LEN )
+				{
+					/* Hupsa! Soviel Platz haben wir aber gar nicht! */
+					Log( LOG_ALERT, "Can't move read buffer: No space left in unzip buffer (need %d bytes)!", My_Connections[Idx].rdatalen );
+					return FALSE;
 				}
+				memcpy( My_Connections[Idx].zip.rbuf, My_Connections[Idx].rbuf, My_Connections[Idx].rdatalen );
+				My_Connections[Idx].zip.rdatalen = My_Connections[Idx].rdatalen;
+				My_Connections[Idx].rdatalen = 0;
+#ifdef DEBUG
+				Log( LOG_DEBUG, "Moved already received data (%d bytes) to uncompression buffer.", My_Connections[Idx].zip.rdatalen );
+#endif /* DEBUG */
 			}
-#endif
+#endif /* ZLIB */
 		}
 
 		if( action ) result = TRUE;