Fixed up mutexes and removed recursive call into libbitdht on callback.

* mUdpBitDht doesn't need to be protected by a mutex - as it is static for all intensive purposes.
  * updated PeerCallback() fn signature, and removed extra address callback. (part of args now!).



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3858 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2010-11-23 00:06:54 +00:00
parent ea3311eb2a
commit bb102750f3
2 changed files with 11 additions and 37 deletions

View file

@ -81,7 +81,7 @@ virtual bool getExternalInterface(struct sockaddr_in &raddr,
/* Callback functions - from bitdht */
int NodeCallback(const bdId *id, uint32_t peerflags);
int PeerCallback(const bdNodeId *id, uint32_t status);
int PeerCallback(const bdId *id, uint32_t status);
int ValueCallback(const bdNodeId *id, std::string key, uint32_t status);
private:
@ -93,7 +93,7 @@ int ValueCallback(const bdNodeId *id, std::string key, uint32_t status);
int storeTranslation(const std::string pid);
int removeTranslation(const std::string pid);
UdpBitDht *mUdpBitDht; /* has own mutex */
UdpBitDht *mUdpBitDht; /* has own mutex, is static except for creation/destruction */
RsMutex dhtMtx;
/* translation maps */