enabled recursive lock behavior on main bitdht thread to handle self-lock in DHT callbacks

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3849 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2010-11-21 22:46:47 +00:00
parent 42fb103738
commit 8a3d3f8c0d
2 changed files with 24 additions and 7 deletions

View file

@ -51,7 +51,7 @@
/*************************************/
UdpBitDht::UdpBitDht(UdpPublisher *pub, bdNodeId *id, std::string appVersion, std::string bootstrapfile, bdDhtFunctions *fns)
:UdpSubReceiver(pub), mFns(fns)
:UdpSubReceiver(pub), dhtMtx(true), mFns(fns)
{
std::string usedVersion;
@ -210,6 +210,7 @@ void UdpBitDht::run()
}
{
bdStackMutex stack(dhtMtx); /********** MUTEX LOCKED *************/
mBitDhtManager->iteration();
}
sleep(1);