mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-12 16:43:17 -04:00
Hackish changes to debug Windows Transfers...
Committing these so others can run tests. Most of these changes will be removed once the problem is fixed! * Fixed formatting of various serialiser item::print() fns. * Disabled printout of TlvBinaryData - data. * added AccurateTimeString() function to util/rsprint.cc * print serialise / deserialise of FileRequest & FileData + Timestamps. * added print + timestamp in ftFileProvider::getFileData() * #define TRANSFER_DEBUG to isolate these changes. * enabled debugging in fttransfermodule.cc git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3779 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
9397491634
commit
06273fa775
6 changed files with 109 additions and 3 deletions
|
@ -13,6 +13,16 @@
|
|||
* #define DEBUG_FT_FILE_PROVIDER 1
|
||||
********/
|
||||
|
||||
/***** TO GET TIMESTAMPS of DATA READING ****/
|
||||
#define DEBUG_TRANSFERS 1
|
||||
|
||||
#ifdef DEBUG_TRANSFERS
|
||||
#include "util/rsprint.h"
|
||||
#include <iomanip>
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
static const time_t UPLOAD_CHUNK_MAPS_TIME = 20 ; // time to ask for a new chunkmap from uploaders in seconds.
|
||||
|
||||
ftFileProvider::ftFileProvider(std::string path, uint64_t size, std::string hash)
|
||||
|
@ -186,6 +196,17 @@ bool ftFileProvider::getFileData(const std::string& peer_id,uint64_t offset, uin
|
|||
//
|
||||
time_t now = time(NULL) ;
|
||||
uploading_peers[peer_id].updateStatus(offset,data_size,now) ;
|
||||
|
||||
#ifdef DEBUG_TRANSFERS
|
||||
std::cerr << "ftFileProvider::getFileData() ";
|
||||
std::cerr << " at " << RsUtil::AccurateTimeString();
|
||||
std::cerr << " hash: " << hash;
|
||||
std::cerr << " for peerId: " << peer_id;
|
||||
std::cerr << " offset: " << offset;
|
||||
std::cerr << " chunkSize: " << chunk_size;
|
||||
std::cerr << std::endl;
|
||||
#endif
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue