mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 14:16:16 -04:00
- made the names consistent between ftdata, ftdatamultiplex and tests/
- added missing virtual functions in ftDataRecv - setup initSSL instance as a static member of AuthSSL, instead of an external (does not change much except the init in rsinit.cc) - changed p3PeerMgrIMPL to take SSL and PGP ids as parameters. This avoids calling AuthSSL and AuthGPG from the constructor => very helpful for tests. - added random creation function in t_RsGenericId<> - added functions setAuthSSL_debug() and setAuthGPG_debug() to manually setup the authSSL and authGPG objects to use. Used in tests. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6035 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
69859f2a43
commit
66207b81e5
12 changed files with 52 additions and 23 deletions
|
@ -99,6 +99,10 @@ class ftDataRecv
|
|||
|
||||
/// Send a chunk map
|
||||
virtual bool recvCRC32Map(const std::string& peer_id,const std::string& hash,const CRC32Map& crcmap) = 0;
|
||||
|
||||
virtual bool recvSingleChunkCRCRequest(const std::string& peer_id,const std::string& hash,uint32_t chunk_id) = 0;
|
||||
virtual bool recvSingleChunkCRC(const std::string& peer_id,const std::string& hash,uint32_t chunk_id,const Sha1CheckSum& sum) = 0;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -285,7 +285,7 @@ bool ftDataMultiplex::recvCRC32MapRequest(const std::string& peerId, const std::
|
|||
|
||||
return true;
|
||||
}
|
||||
bool ftDataMultiplex::recvSingleChunkCrcRequest(const std::string& peerId, const std::string& hash,uint32_t chunk_number)
|
||||
bool ftDataMultiplex::recvSingleChunkCRCRequest(const std::string& peerId, const std::string& hash,uint32_t chunk_number)
|
||||
{
|
||||
#ifdef MPLEX_DEBUG
|
||||
std::cerr << "ftDataMultiplex::recvChunkMapRequest() Server Recv";
|
||||
|
@ -489,7 +489,7 @@ bool ftDataMultiplex::doWork()
|
|||
return true;
|
||||
}
|
||||
|
||||
bool ftDataMultiplex::recvSingleChunkCrc(const std::string& peerId, const std::string& hash,uint32_t chunk_number,const Sha1CheckSum& crc)
|
||||
bool ftDataMultiplex::recvSingleChunkCRC(const std::string& peerId, const std::string& hash,uint32_t chunk_number,const Sha1CheckSum& crc)
|
||||
{
|
||||
RsStackMutex stack(dataMtx); /******* LOCK MUTEX ******/
|
||||
|
||||
|
|
|
@ -148,8 +148,8 @@ class ftDataMultiplex: public ftDataRecv, public RsQueueThread
|
|||
/// Receive a CRC map request
|
||||
virtual bool recvCRC32MapRequest(const std::string& peer_id,const std::string& hash) ;
|
||||
|
||||
virtual bool recvSingleChunkCrcRequest(const std::string& peer_id,const std::string& hash,uint32_t chunk_id) ;
|
||||
virtual bool recvSingleChunkCrc(const std::string& peer_id,const std::string& hash,uint32_t chunk_id,const Sha1CheckSum& sum) ;
|
||||
virtual bool recvSingleChunkCRCRequest(const std::string& peer_id,const std::string& hash,uint32_t chunk_id) ;
|
||||
virtual bool recvSingleChunkCRC(const std::string& peer_id,const std::string& hash,uint32_t chunk_id,const Sha1CheckSum& sum) ;
|
||||
|
||||
// Returns the chunk map from the file uploading client. Also initiates a chunk map request if this
|
||||
// map is too old. This supposes that the caller will ask again in a few seconds.
|
||||
|
|
|
@ -1361,7 +1361,7 @@ FileInfo(ffr);
|
|||
i++; /* count */
|
||||
|
||||
/* incoming data */
|
||||
mFtDataplex->recvSingleChunkCrcRequest(fscrcr->PeerId(), fscrcr->hash,fscrcr->chunk_number) ;
|
||||
mFtDataplex->recvSingleChunkCRCRequest(fscrcr->PeerId(), fscrcr->hash,fscrcr->chunk_number) ;
|
||||
|
||||
delete fscrcr;
|
||||
}
|
||||
|
@ -1382,7 +1382,7 @@ FileInfo(ffr);
|
|||
i++; /* count */
|
||||
|
||||
/* incoming data */
|
||||
mFtDataplex->recvSingleChunkCrc(fscrc->PeerId(), fscrc->hash,fscrc->chunk_number,fscrc->check_sum);
|
||||
mFtDataplex->recvSingleChunkCRC(fscrc->PeerId(), fscrc->hash,fscrc->chunk_number,fscrc->check_sum);
|
||||
|
||||
delete fscrcr;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue