mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-03-20 13:56:39 -04:00
Various Bugfixes:
* Clear discFlags before creating DiscItem packets. * Don't call stunStatus/peerStatus if refering to self (p3disc). * Expand allowed listen port range. * Limit max size of stored StunList. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@357 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
b64b88df4a
commit
e87b7b75e7
@ -2116,7 +2116,9 @@ std::list<RsItem *> p3ConnectMgr::saveList(bool &cleanup)
|
||||
RsPeerStunItem *sitem = new RsPeerStunItem();
|
||||
|
||||
std::list<std::string>::iterator sit;
|
||||
for(sit = mStunList.begin(); sit != mStunList.end(); sit++)
|
||||
uint32_t count = 0;
|
||||
for(sit = mStunList.begin(); (sit != mStunList.end()) &&
|
||||
(count < RS_STUN_LIST_MIN); sit++, count++)
|
||||
{
|
||||
sitem->stunList.ids.push_back(*sit);
|
||||
}
|
||||
|
@ -41,7 +41,7 @@
|
||||
|
||||
|
||||
#define PQI_MIN_PORT 1024
|
||||
#define PQI_MAX_PORT 16000
|
||||
#define PQI_MAX_PORT 50000
|
||||
#define PQI_DEFAULT_PORT 7812
|
||||
|
||||
int getPQIsearchId();
|
||||
|
@ -326,6 +326,7 @@ void p3disc::sendOwnDetails(std::string to)
|
||||
di -> contact_tf = 0;
|
||||
|
||||
/* construct disc flags */
|
||||
di -> discFlags = 0;
|
||||
if (!(detail.visState & RS_VIS_STATE_NODISC))
|
||||
{
|
||||
di->discFlags |= P3DISC_FLAGS_USE_DISC;
|
||||
@ -545,7 +546,8 @@ void p3disc::recvPeerFriendMsg(RsDiscReply *item)
|
||||
flags |= RS_NET_FLAGS_EXTERNAL_ADDR;
|
||||
}
|
||||
|
||||
if (loaded)
|
||||
/* only valid certs, and not ourselves */
|
||||
if ((loaded) && (peerId != mConnMgr->getOwnId()))
|
||||
{
|
||||
mConnMgr->peerStatus(peerId, item->laddr,
|
||||
item->saddr, type, flags, RS_CB_DISC);
|
||||
|
Loading…
x
Reference in New Issue
Block a user