mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-03 06:35:08 -04:00
More Tweaks before first release.
* Switched on RELEASE flag. * renamed incomplete work to "Unfinished" * updated version strings. * Added Configuration path to DhtMgr. * reduced uPnP timeout to 30 seconds (from 60). * more Bin -> BinToHex printouts. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@373 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
9bdd44d0f5
commit
fd1beee309
9 changed files with 17 additions and 13 deletions
|
@ -81,7 +81,7 @@ int main(int argc, char **argv)
|
|||
time_t startTime = time(NULL);
|
||||
|
||||
pqiConnectCbDummy cbTester;
|
||||
OpenDHTMgr dhtTester(ownId, &cbTester);
|
||||
OpenDHTMgr dhtTester(ownId, &cbTester, ".");
|
||||
|
||||
/* startup dht */
|
||||
std::cerr << "Starting up DhtTester()" << std::endl;
|
||||
|
|
|
@ -99,8 +99,8 @@ extern "C" void* doDhtSearch(void* p)
|
|||
|
||||
|
||||
|
||||
OpenDHTMgr::OpenDHTMgr(std::string ownId, pqiConnectCb* cb)
|
||||
:p3DhtMgr(ownId, cb)
|
||||
OpenDHTMgr::OpenDHTMgr(std::string ownId, pqiConnectCb* cb, std::string configdir)
|
||||
:p3DhtMgr(ownId, cb), mConfigDir(configdir)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -109,7 +109,7 @@ OpenDHTMgr::OpenDHTMgr(std::string ownId, pqiConnectCb* cb)
|
|||
/********** OVERLOADED FROM p3DhtMgr ***************/
|
||||
bool OpenDHTMgr::init()
|
||||
{
|
||||
std::string configpath = ".";
|
||||
std::string configpath = mConfigDir;
|
||||
|
||||
/* load up DHT gateways */
|
||||
mClient = new OpenDHTClient();
|
||||
|
@ -120,7 +120,7 @@ bool OpenDHTMgr::init()
|
|||
{
|
||||
filename += "/";
|
||||
}
|
||||
filename += "servers.txt";
|
||||
filename += "ODHTservers.txt";
|
||||
|
||||
if (!mClient -> loadServersFromWeb(filename))
|
||||
{
|
||||
|
|
|
@ -37,7 +37,7 @@ class OpenDHTMgr: public p3DhtMgr
|
|||
{
|
||||
public:
|
||||
|
||||
OpenDHTMgr(std::string ownId, pqiConnectCb* cb);
|
||||
OpenDHTMgr(std::string ownId, pqiConnectCb* cb, std::string configdir);
|
||||
|
||||
protected:
|
||||
|
||||
|
@ -56,6 +56,7 @@ virtual bool searchDHT(std::string key);
|
|||
private:
|
||||
|
||||
DHTClient *mClient;
|
||||
std::string mConfigDir;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ const uint32_t RS_STUN_DHT = 0x0001;
|
|||
const uint32_t RS_STUN_DONE = 0x0002;
|
||||
const uint32_t RS_STUN_LIST_MIN = 100;
|
||||
|
||||
const uint32_t MAX_UPNP_INIT = 60; /* seconds UPnP timeout */
|
||||
const uint32_t MAX_UPNP_INIT = 30; /* seconds UPnP timeout */
|
||||
|
||||
/****
|
||||
* #define CONN_DEBUG 1
|
||||
|
|
|
@ -1155,7 +1155,8 @@ bool p3DhtMgr::resultDHT(std::string key, std::string value)
|
|||
*/
|
||||
|
||||
#ifdef DHT_DEBUG
|
||||
std::cerr << "p3DhtMgr::resultDHT() key: " << key << " value: " << value << std::endl;
|
||||
std::cerr << "p3DhtMgr::resultDHT() key: 0x" << RsUtil::BinToHex(key);
|
||||
std::cerr << " value: 0x" << RsUtil::BinToHex(value) << std::endl;
|
||||
#endif
|
||||
|
||||
/* variables for dhtResult() call */
|
||||
|
|
|
@ -480,7 +480,7 @@ int RsServer::StartupRetroShare(RsInit *config)
|
|||
|
||||
mConnMgr = new p3ConnectMgr(mAuthMgr);
|
||||
p3UpnpMgr *mUpnpMgr = new upnphandler();
|
||||
p3DhtMgr *mDhtMgr = new OpenDHTMgr(ownId, mConnMgr);
|
||||
p3DhtMgr *mDhtMgr = new OpenDHTMgr(ownId, mConnMgr, config->basedir);
|
||||
|
||||
CacheStrapper *mCacheStrapper = new CacheStrapper(mAuthMgr, mConnMgr);
|
||||
ftfiler *mCacheTransfer = new ftfiler(mCacheStrapper);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue