mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-26 16:05:48 -04:00
Add lobby_identity check
This commit is contained in:
parent
40d9398b38
commit
089ea76a6e
1 changed files with 7 additions and 0 deletions
|
@ -1606,6 +1606,13 @@ ChatLobbyId DistributedChatService::createChatLobby(const std::string& lobby_nam
|
||||||
{
|
{
|
||||||
RsStackMutex stack(mDistributedChatMtx); /********** STACK LOCKED MTX ******/
|
RsStackMutex stack(mDistributedChatMtx); /********** STACK LOCKED MTX ******/
|
||||||
|
|
||||||
|
if (!rsIdentity->isOwnId(lobby_identity))
|
||||||
|
{
|
||||||
|
RsErr() << __PRETTY_FUNCTION__ << " lobby_identity RsGxsId id must be own" << std::endl;
|
||||||
|
lobby_id = 00000000000000000000;
|
||||||
|
return lobby_id;
|
||||||
|
}
|
||||||
|
|
||||||
// create a unique id.
|
// create a unique id.
|
||||||
//
|
//
|
||||||
do { lobby_id = RSRandom::random_u64() ; } while(_chat_lobbys.find(lobby_id) != _chat_lobbys.end()) ;
|
do { lobby_id = RSRandom::random_u64() ; } while(_chat_lobbys.find(lobby_id) != _chat_lobbys.end()) ;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue