mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-28 08:59:37 -05:00
attempt at fixing negative bw rates in GUI that may pop up when an error is present in the SSL stream (e.g. when a peer disconnects/reconnects)
This commit is contained in:
parent
20fcf635e4
commit
bb260696ce
@ -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
|
||||
{
|
||||
|
@ -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 );
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user