fixed bug in previous commit for chat lobbies

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8386 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2015-06-06 14:01:08 +00:00
parent ea7a5a5929
commit 377eb50c6e
2 changed files with 23 additions and 25 deletions

View File

@ -1646,20 +1646,20 @@ bool DistributedChatService::setIdentityForChatLobby(const ChatLobbyId& lobby_id
} }
if (!it->second.gxs_id.isNull() && it->second.gxs_id != nick) if (!it->second.gxs_id.isNull() && it->second.gxs_id != nick)
changed = true;
}
if (changed)
{
// Inform other peers of change the Nickname
{ {
RsIdentityDetails det1,det2 ; RsIdentityDetails det1,det2 ;
// Only send a nickname change event if the two Identities are not anonymous // Only send a nickname change event if the two Identities are not anonymous
if(rsIdentity->getIdDetails(nick,det1) && rsIdentity->getIdDetails(it->second.gxs_id,det2) && det1.mPgpLinked && det2.mPgpLinked) if(rsIdentity->getIdDetails(nick,det1) && rsIdentity->getIdDetails(it->second.gxs_id,det2) && det1.mPgpLinked && det2.mPgpLinked)
changed = true;
}
}
if (changed)
{
// Inform other peers of change the Nickname
sendLobbyStatusPeerChangedNickname(lobby_id, nick.toStdString()) ; sendLobbyStatusPeerChangedNickname(lobby_id, nick.toStdString()) ;
}
// set new nick name // set new nick name
RsStackMutex stack(mDistributedChatMtx); /********** STACK LOCKED MTX ******/ RsStackMutex stack(mDistributedChatMtx); /********** STACK LOCKED MTX ******/

View File

@ -372,8 +372,6 @@ private:
struct sockaddr_storage mProxyServerAddress; struct sockaddr_storage mProxyServerAddress;
uint32_t mProxyServerStatus ; uint32_t mProxyServerStatus ;
//std::map<RsPeerId,std::pair<sockaddr_storage,time_t> > mReportedConnectionIps ;
}; };
#endif // MRK_PQI_PEER_MANAGER_HEADER #endif // MRK_PQI_PEER_MANAGER_HEADER