mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-26 23:36:59 -05:00
added missing own id from group list, and removed possible duplicates in random group ids
This commit is contained in:
parent
269f9457be
commit
a69629cf73
@ -2304,7 +2304,8 @@ bool p3PeerMgrIMPL::loadList(std::list<RsItem *>& load)
|
||||
ginfo.flag = gitem->flag ;
|
||||
ginfo.name = gitem->name ;
|
||||
ginfo.peerIds = gitem->pgpList.ids ;
|
||||
ginfo.id = RsNodeGroupId::random() ;
|
||||
|
||||
do { ginfo.id = RsNodeGroupId::random(); } while(groupList.find(ginfo.id) != groupList.end()) ;
|
||||
|
||||
// Ensure backward compatibility when loading the group in old format. The id must matchthe standard default id.
|
||||
|
||||
@ -2484,7 +2485,8 @@ bool p3PeerMgrIMPL::addGroup(RsGroupInfo &groupInfo)
|
||||
{
|
||||
RsStackMutex stack(mPeerMtx); /****** STACK LOCK MUTEX *******/
|
||||
|
||||
groupInfo.id = RsNodeGroupId::random() ;//groupItem->id; // at creation time, we generate a random id.
|
||||
do { groupInfo.id = RsNodeGroupId::random(); } while(groupList.find(groupInfo.id) != groupList.end()) ;
|
||||
|
||||
RsGroupInfo groupItem(groupInfo) ;
|
||||
|
||||
// remove standard flag
|
||||
|
@ -305,6 +305,9 @@ void FriendSelectionWidget::secured_fillList()
|
||||
else
|
||||
rsPeers->getGPGAcceptedList(gpgIds);
|
||||
|
||||
// add own pgp id to the list
|
||||
gpgIds.push_back(rsPeers->getGPGOwnId()) ;
|
||||
|
||||
std::list<RsPeerId> sslIds;
|
||||
std::list<RsPeerId>::iterator sslIt;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user