mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2025-12-29 06:05:30 -08:00
more mutexes
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user