mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-06 21:58:57 -04:00
Tweaked DSDV parameters.
Broadcast Time = 10min. Max Hops = 3 (2 Hops are broadcast). Removed print of RsDsdvRouteItem. git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-dhtmods@4699 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
02b03d1a0f
commit
8b40826940
2 changed files with 6 additions and 6 deletions
|
@ -84,7 +84,7 @@ int p3Dsdv::status()
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define DSDV_BROADCAST_PERIOD 60
|
#define DSDV_BROADCAST_PERIOD (60*10) // 10 Minutes.
|
||||||
#define DSDV_MIN_INCREMENT_PERIOD 5
|
#define DSDV_MIN_INCREMENT_PERIOD 5
|
||||||
#define DSDV_DISCARD_PERIOD (DSDV_BROADCAST_PERIOD * 2)
|
#define DSDV_DISCARD_PERIOD (DSDV_BROADCAST_PERIOD * 2)
|
||||||
|
|
||||||
|
@ -305,8 +305,8 @@ int p3Dsdv::handleDSDV(RsDsdvRouteItem *dsdv)
|
||||||
#ifdef DEBUG_DSDV
|
#ifdef DEBUG_DSDV
|
||||||
std::cerr << "p3Dsdv::handleDSDV() Received Pkt from: " << dsdv->PeerId();
|
std::cerr << "p3Dsdv::handleDSDV() Received Pkt from: " << dsdv->PeerId();
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
dsdv->print(std::cerr);
|
//dsdv->print(std::cerr);
|
||||||
std::cerr << std::endl;
|
//std::cerr << std::endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
std::list<RsTlvDsdvEntry>::iterator it;
|
std::list<RsTlvDsdvEntry>::iterator it;
|
||||||
|
@ -469,7 +469,7 @@ int p3Dsdv::selectStableRoutes()
|
||||||
std::map<std::string, RsDsdvRoute>::iterator rit;
|
std::map<std::string, RsDsdvRoute>::iterator rit;
|
||||||
uint32_t newest = 0;
|
uint32_t newest = 0;
|
||||||
std::string newestId;
|
std::string newestId;
|
||||||
uint32_t closest = RSDSDV_MAX_DISTANCE;
|
uint32_t closest = RSDSDV_MAX_DISTANCE + 1;
|
||||||
std::string closestId;
|
std::string closestId;
|
||||||
time_t closestAge = 0;
|
time_t closestAge = 0;
|
||||||
|
|
||||||
|
@ -490,7 +490,7 @@ int p3Dsdv::selectStableRoutes()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (closest == RSDSDV_MAX_DISTANCE)
|
if (closest >= RSDSDV_MAX_DISTANCE + 1)
|
||||||
{
|
{
|
||||||
#ifdef DEBUG_DSDV
|
#ifdef DEBUG_DSDV
|
||||||
std::cerr << "\tNo Suitable Route";
|
std::cerr << "\tNo Suitable Route";
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
class p3LinkMgr;
|
class p3LinkMgr;
|
||||||
|
|
||||||
|
|
||||||
#define RSDSDV_MAX_DISTANCE 5
|
#define RSDSDV_MAX_DISTANCE 3
|
||||||
#define RSDSDV_MAX_SEND_TABLE 100
|
#define RSDSDV_MAX_SEND_TABLE 100
|
||||||
|
|
||||||
//!The RS DSDV service.
|
//!The RS DSDV service.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue