mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-26 07:55:44 -04:00
Fixed up BITDHT versioning.
* Advertises client as DBxxxx where xxxx is provided by using app. * Added COMPILE switches to enable ANONYMOUS version or remove BD portion. * Fixed version code. * Added slow increase in retry timeout, to reduce DHT traffic over time. now RETRY PERIOD = query age / 2 * initialised bdToken bdVersion etc length. * new bdboot.txt git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3615 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
d31cef0f11
commit
cc5fa5e5dc
9 changed files with 268 additions and 208 deletions
|
@ -41,17 +41,31 @@
|
|||
|
||||
/*
|
||||
* #define DEBUG_UDP_BITDHT 1
|
||||
*
|
||||
* #define BITDHT_VERSION_ANONYMOUS 1
|
||||
*/
|
||||
|
||||
//#define DEBUG_UDP_BITDHT 1
|
||||
|
||||
#define BITDHT_VERSION_IDENTIFER 1
|
||||
/*************************************/
|
||||
|
||||
UdpBitDht::UdpBitDht(UdpPublisher *pub, bdNodeId *id, std::string dhtVersion, std::string bootstrapfile, bdDhtFunctions *fns)
|
||||
UdpBitDht::UdpBitDht(UdpPublisher *pub, bdNodeId *id, std::string appVersion, std::string bootstrapfile, bdDhtFunctions *fns)
|
||||
:UdpSubReceiver(pub), mFns(fns)
|
||||
{
|
||||
std::string usedVersion;
|
||||
|
||||
#ifdef BITDHT_VERSION_IDENTIFER
|
||||
usedVersion = "BD";
|
||||
#endif
|
||||
usedVersion += appVersion;
|
||||
|
||||
#ifdef BITDHT_VERSION_ANONYMOUS
|
||||
usedVersion = ""; /* blank it */
|
||||
#endif
|
||||
|
||||
/* setup nodeManager */
|
||||
mBitDhtManager = new bdNodeManager(id, dhtVersion, bootstrapfile, fns);
|
||||
mBitDhtManager = new bdNodeManager(id, usedVersion, bootstrapfile, fns);
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue