mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
* Added "lastcontact = now" when added SSL Peer. This ensures that new certificates will be retained for at least 30 days.
=> Giving new peers a chance to connect. * Fixed missing return in p3PeerMgr::removeUnusedLocations() * moved RTT defines to top of file, and increased to 150 results. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4546 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
cd41eda638
commit
8688c65f4c
@ -1774,6 +1774,8 @@ bool p3PeerMgrIMPL::removeUnusedLocations()
|
|||||||
{
|
{
|
||||||
removeFriend(*it);
|
removeFriend(*it);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -808,8 +808,12 @@ bool p3Peers::addFriend(const std::string &ssl_id, const std::string &gpg_id)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* otherwise - we install as ssl_id. */
|
/* otherwise - we install as ssl_id.....
|
||||||
return mPeerMgr->addFriend(ssl_id, gpg_id);
|
* If we are adding an SSL certificate. we flag lastcontact as now.
|
||||||
|
* This will cause the SSL certificate to be retained for 30 days... and give the person a chance to connect!
|
||||||
|
* */
|
||||||
|
time_t now = time(NULL);
|
||||||
|
return mPeerMgr->addFriend(ssl_id, gpg_id, RS_NET_MODE_UDP, RS_VIS_STATE_STD, now);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -44,6 +44,8 @@
|
|||||||
RsVoip *rsVoip = NULL;
|
RsVoip *rsVoip = NULL;
|
||||||
|
|
||||||
|
|
||||||
|
#define MAX_PONG_RESULTS 150
|
||||||
|
#define VORS_PING_PERIOD 10
|
||||||
|
|
||||||
/************ IMPLEMENTATION NOTES *********************************
|
/************ IMPLEMENTATION NOTES *********************************
|
||||||
*
|
*
|
||||||
@ -166,7 +168,6 @@ int p3VoRS::status()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#define VORS_PING_PERIOD 10
|
|
||||||
|
|
||||||
int p3VoRS::sendPackets()
|
int p3VoRS::sendPackets()
|
||||||
{
|
{
|
||||||
@ -406,7 +407,6 @@ int p3VoRS::storePongResult(std::string id, uint32_t counter, double ts, double
|
|||||||
|
|
||||||
peerInfo->mPongResults.push_back(RsVoipPongResult(ts, rtt, offset));
|
peerInfo->mPongResults.push_back(RsVoipPongResult(ts, rtt, offset));
|
||||||
|
|
||||||
#define MAX_PONG_RESULTS 100
|
|
||||||
|
|
||||||
while(peerInfo->mPongResults.size() > MAX_PONG_RESULTS)
|
while(peerInfo->mPongResults.size() > MAX_PONG_RESULTS)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user