mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
more mutexes
This commit is contained in:
parent
4548841a93
commit
81a5d58d70
10 changed files with 127 additions and 7 deletions
|
|
@ -68,6 +68,8 @@ ResponseCode Server_ProtocolHandler::processCommandHelper(Command *command, Comm
|
|||
if (!room)
|
||||
return RespNameNotFound;
|
||||
|
||||
QMutexLocker locker(&room->roomMutex);
|
||||
|
||||
switch (command->getItemId()) {
|
||||
case ItemId_Command_LeaveRoom: return cmdLeaveRoom(static_cast<Command_LeaveRoom *>(command), cont, room);
|
||||
case ItemId_Command_RoomSay: return cmdRoomSay(static_cast<Command_RoomSay *>(command), cont, room);
|
||||
|
|
@ -90,6 +92,8 @@ ResponseCode Server_ProtocolHandler::processCommandHelper(Command *command, Comm
|
|||
Server_Game *game = gamePair.first;
|
||||
Server_Player *player = gamePair.second;
|
||||
|
||||
QMutexLocker locker(&game->gameMutex);
|
||||
|
||||
switch (command->getItemId()) {
|
||||
case ItemId_Command_DeckSelect: return cmdDeckSelect(static_cast<Command_DeckSelect *>(command), cont, game, player);
|
||||
case ItemId_Command_SetSideboardPlan: return cmdSetSideboardPlan(static_cast<Command_SetSideboardPlan *>(command), cont, game, player);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue