added gnutls backend and moved backend code into new files
[ircu2.10.12-pk.git] / ircd / packet.c
index 100f592f0b57225c7332329bc4ebb83a60987227..763440864ab2e84ef722f1656d45a25427c7d87e 100644 (file)
 #include "client.h"
 #include "ircd.h"
 #include "ircd_chattr.h"
+#include "ircd_log.h"
 #include "parse.h"
 #include "s_bsd.h"
 #include "s_misc.h"
 #include "send.h"
 
-#include <assert.h>
+/* #include <assert.h> -- Now using assert in ircd_log.h */
 
 /** Add a certain number of bytes to a client's received statistics.
  * @param[in,out] cptr Client to update.
@@ -42,15 +43,6 @@ static void update_bytes_received(struct Client* cptr, unsigned int length)
 {
   cli_receiveB(&me)  += length;     /* Update bytes received */
   cli_receiveB(cptr) += length;
-
-  if (cli_receiveB(cptr) > 1023) {
-    cli_receiveK(cptr) += (cli_receiveB(cptr) >> 10);
-    cli_receiveB(cptr) &= 0x03ff;   /* 2^10 = 1024, 3ff = 1023 */
-  }
-  if (cli_receiveB(&me) > 1023) {
-    cli_receiveK(&me) += (cli_receiveB(&me) >> 10);
-    cli_receiveB(&me) &= 0x03ff;
-  }
 }
 
 /** Add one message to a client's received statistics.