diff --git a/libretroshare/src/pqi/pqistreamer.cc b/libretroshare/src/pqi/pqistreamer.cc index 6f020a1ed..7a4b1dbdd 100644 --- a/libretroshare/src/pqi/pqistreamer.cc +++ b/libretroshare/src/pqi/pqistreamer.cc @@ -823,8 +823,6 @@ continue_packet: std::cerr << "[" << (void*)pthread_self() << "] " << "deserializing. Size=" << pktlen << std::endl ; #endif - inReadBytes_locked(pktlen); // only count deserialised packets, because that's what is actually been transfered. - RsItem *pkt = mRsSerialiser->deserialise(block, &pktlen); if ((pkt != NULL) && (0 < handleincomingitem_locked(pkt,pktlen))) @@ -832,6 +830,7 @@ continue_packet: #ifdef DEBUG_PQISTREAMER pqioutput(PQL_DEBUG_BASIC, pqistreamerzone, "Successfully Read a Packet!"); #endif + inReadBytes_locked(pktlen); // only count deserialised packets, because that's what is actually been transfered. } else { @@ -952,7 +951,7 @@ int pqistreamer::inAllowedBytes_locked() static const float AVG_PERIOD = 5; // sec static const float AVG_FRAC = 0.8; // for low pass filter. -void pqistreamer::outSentBytes_locked(int outb) +void pqistreamer::outSentBytes_locked(uint32_t outb) { #ifdef DEBUG_PQISTREAMER { @@ -1022,7 +1021,7 @@ void pqistreamer::outSentBytes_locked(int outb) return; } -void pqistreamer::inReadBytes_locked(int inb) +void pqistreamer::inReadBytes_locked(uint32_t inb) { #ifdef DEBUG_PQISTREAMER { diff --git a/libretroshare/src/pqi/pqistreamer.h b/libretroshare/src/pqi/pqistreamer.h index 329a4a897..4a834c0f9 100644 --- a/libretroshare/src/pqi/pqistreamer.h +++ b/libretroshare/src/pqi/pqistreamer.h @@ -102,10 +102,10 @@ class pqistreamer: public PQInterface float outTimeSlice_locked(); int outAllowedBytes_locked(); - void outSentBytes_locked(int ); + void outSentBytes_locked(uint32_t ); int inAllowedBytes_locked(); - void inReadBytes_locked(int ); + void inReadBytes_locked(uint32_t );