mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-13 11:32:48 -04:00
Bugfixes and extra debugging for file transfer.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@791 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
6343de176e
commit
80f4686100
12 changed files with 333 additions and 230 deletions
|
@ -72,13 +72,15 @@ class peerInfo
|
|||
{
|
||||
public:
|
||||
peerInfo(std::string peerId_in):peerId(peerId_in),state(PQIPEER_NOT_ONLINE),desiredRate(0),actualRate(0),
|
||||
offset(0),chunkSize(TRANSFER_START_MIN),receivedSize(0),lastTS(0)
|
||||
offset(0),chunkSize(TRANSFER_START_MIN),receivedSize(0),lastTS(0),
|
||||
recvTS(0), lastTransfers(0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
peerInfo(std::string peerId_in,uint32_t state_in,uint32_t maxRate_in):
|
||||
peerId(peerId_in),state(state_in),desiredRate(maxRate_in),actualRate(0),
|
||||
offset(0),chunkSize(TRANSFER_START_MIN),receivedSize(0),lastTS(0)
|
||||
offset(0),chunkSize(TRANSFER_START_MIN),receivedSize(0),lastTS(0),
|
||||
recvTS(0), lastTransfers(0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -94,7 +96,9 @@ public:
|
|||
//already received data size for current request
|
||||
uint32_t receivedSize;
|
||||
|
||||
time_t lastTS;
|
||||
time_t lastTS; /* last Request */
|
||||
time_t recvTS; /* last Recv */
|
||||
uint32_t lastTransfers; /* data recvd in last second */
|
||||
};
|
||||
|
||||
class ftFileStatus
|
||||
|
@ -160,6 +164,11 @@ public:
|
|||
|
||||
private:
|
||||
|
||||
bool locked_tickPeerTransfer(peerInfo &info);
|
||||
bool locked_recvPeerData(peerInfo &info, uint64_t offset,
|
||||
uint32_t chunk_size, void *data);
|
||||
|
||||
|
||||
/* These have independent Mutexes / are const locally (no Mutex protection)*/
|
||||
ftFileCreator *mFileCreator;
|
||||
ftDataMultiplex *mMultiplexor;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue