diff options
| author | Alexander Barton <alex@barton.de> | 2006-07-23 15:22:56 +0000 |
|---|---|---|
| committer | Alexander Barton <alex@barton.de> | 2006-07-23 15:22:56 +0000 |
| commit | 9a2d4eef44a36bc8cd5e3d3038b5f0f48ee4c29f (patch) | |
| tree | fd159d5f21e24a5ea55cba0730015f9dfc78c972 /src | |
| parent | 0d5fc770d339f261b4d6c779bb4bc87a61f404b6 (diff) | |
| download | ngircd-9a2d4eef44a36bc8cd5e3d3038b5f0f48ee4c29f.tar.gz ngircd-9a2d4eef44a36bc8cd5e3d3038b5f0f48ee4c29f.zip | |
"Enhanced" debug message for Handle_Write(), only print when data in buffer.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ngircd/conn.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/ngircd/conn.c b/src/ngircd/conn.c index 5e672ff3..39cec07a 100644 --- a/src/ngircd/conn.c +++ b/src/ngircd/conn.c @@ -17,7 +17,7 @@ #include "portab.h" #include "io.h" -static char UNUSED id[] = "$Id: conn.c,v 1.196 2006/05/12 11:53:04 alex Exp $"; +static char UNUSED id[] = "$Id: conn.c,v 1.197 2006/07/23 15:22:56 alex Exp $"; #include "imp.h" #include <assert.h> @@ -845,9 +845,8 @@ Handle_Write( CONN_ID Idx ) } assert( My_Connections[Idx].sock > NONE ); - LogDebug("Handle_Write() called for connection %d ...", Idx); - wdatalen = array_bytes(&My_Connections[Idx].wbuf ); + #ifdef ZLIB if (wdatalen == 0 && !array_bytes(&My_Connections[Idx].zip.wbuf)) { io_event_del(My_Connections[Idx].sock, IO_WANTWRITE ); @@ -865,8 +864,11 @@ Handle_Write( CONN_ID Idx ) } #endif - /* Zip_Flush() may have changed the write buffer ... */ + /* Zip_Flush() may have changed the write buffer ... */ wdatalen = array_bytes(&My_Connections[Idx].wbuf); + LogDebug + ("Handle_Write() called for connection %d, %ld bytes pending ...", + Idx, wdatalen); len = write(My_Connections[Idx].sock, array_start(&My_Connections[Idx].wbuf), wdatalen ); |