mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-17 05:22:31 -04:00
Bugfixes for connection logic:
* added bool return value to ConnectionRequest. only returns false if MODE not allowed. * added checks for an existingConnectionRequest - results in a NOOP. * made each ConnectionRequest result in only one UDP start. * a START message will not kill a local ConnectionRequest (even in remotely started). * increased CONNECTION_TIMEOUT as this should never happen at this level. git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-netupgrade@4449 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
bffaf6e5ef
commit
6609cec94d
7 changed files with 42 additions and 12 deletions
|
@ -125,11 +125,11 @@ void UdpBitDht::removeCallback(BitDhtCallback *cb)
|
|||
mBitDhtManager->removeCallback(cb);
|
||||
}
|
||||
|
||||
void UdpBitDht::ConnectionRequest(struct sockaddr_in *laddr, bdNodeId *target, uint32_t mode, uint32_t start)
|
||||
bool UdpBitDht::ConnectionRequest(struct sockaddr_in *laddr, bdNodeId *target, uint32_t mode, uint32_t start)
|
||||
{
|
||||
bdStackMutex stack(dhtMtx); /********** MUTEX LOCKED *************/
|
||||
|
||||
mBitDhtManager->ConnectionRequest(laddr, target, mode, start);
|
||||
return mBitDhtManager->ConnectionRequest(laddr, target, mode, start);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ virtual void addCallback(BitDhtCallback *cb);
|
|||
virtual void removeCallback(BitDhtCallback *cb);
|
||||
|
||||
/***** Connections Requests *****/
|
||||
virtual void ConnectionRequest(struct sockaddr_in *laddr, bdNodeId *target, uint32_t mode, uint32_t start);
|
||||
virtual bool ConnectionRequest(struct sockaddr_in *laddr, bdNodeId *target, uint32_t mode, uint32_t start);
|
||||
virtual void ConnectionAuth(bdId *srcId, bdId *proxyId, bdId *destId, uint32_t mode, uint32_t loc, uint32_t answer);
|
||||
virtual void ConnectionOptions(uint32_t allowedModes, uint32_t flags);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue