commit - 98677b4348f8865261cada54249d6ce59b6eb47d
commit + a02bf31d50743df9196310f4261fc09964347fbc
blob - ce245a981356a45ee561eb1736874141ffa9fcac
blob + bc2ccbdcb95301c2e6ad2241c78013a36633a5bc
--- src/ngircd/conn.c
+++ src/ngircd/conn.c
#include "portab.h"
-static char UNUSED id[] = "$Id: conn.c,v 1.105 2002/12/17 11:46:54 alex Exp $";
+static char UNUSED id[] = "$Id: conn.c,v 1.106 2002/12/18 13:50:22 alex Exp $";
#include "imp.h"
#include <assert.h>
LOCAL fd_set My_Connects;
LOCAL CONNECTION *My_Connections;
-LOCAL LONG Pool_Size;
+LOCAL LONG Pool_Size, WCounter;
GLOBAL VOID
/* Connection-Struktur initialisieren */
for( i = 0; i < Pool_Size; i++ ) Init_Conn_Struct( i );
+
+ /* Global write counter */
+ WCounter = 0;
} /* Conn_Init */
My_Connections[Idx].bytes_out += Len;
}
+ /* Adjust global write counter */
+ WCounter += Len;
+
return TRUE;
} /* Conn_Write */
assert( Idx > NONE );
return My_Connections[Idx].bytes_in;
} /* Conn_RecvBytes */
+
+
+GLOBAL VOID
+Conn_ResetWCounter( VOID )
+{
+ WCounter = 0;
+} /* Conn_ResetWCounter */
+GLOBAL LONG
+Conn_WCounter( VOID )
+{
+ return WCounter;
+} /* Conn_WCounter */
+
+
LOCAL BOOLEAN
Try_Write( CONN_ID Idx )
{
blob - f553277db3159ba208d91d7369cc1374934e14f2
blob + b9812156b83d077c1b63ed466c1c23b62fd1040e
--- src/ngircd/conn.h
+++ src/ngircd/conn.h
* (at your option) any later version.
* Please read the file COPYING, README and AUTHORS for more information.
*
- * $Id: conn.h,v 1.25 2002/12/12 12:23:43 alex Exp $
+ * $Id: conn.h,v 1.26 2002/12/18 13:50:22 alex Exp $
*
* Connection management (header)
*/
GLOBAL LONG Conn_RecvBytesZip PARAMS(( CONN_ID Idx ));
#endif
+GLOBAL VOID Conn_ResetWCounter PARAMS(( VOID ));
+GLOBAL LONG Conn_WCounter PARAMS(( VOID ));
+
GLOBAL INT Conn_MaxFD;