From 4548841a93c3a1a47d370e721a8466b6c195beba Mon Sep 17 00:00:00 2001 From: Max-Wilhelm Bruker Date: Tue, 22 Mar 2011 18:31:26 +0100 Subject: [PATCH] server crash fix --- common/server_protocolhandler.cpp | 1 - common/server_protocolhandler.h | 2 +- common/server_room.cpp | 1 + 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/server_protocolhandler.cpp b/common/server_protocolhandler.cpp index 942d45080..c5948bf5d 100644 --- a/common/server_protocolhandler.cpp +++ b/common/server_protocolhandler.cpp @@ -353,7 +353,6 @@ ResponseCode Server_ProtocolHandler::cmdJoinRoom(Command_JoinRoom *cmd, CommandC return RespNameNotFound; r->addClient(this); - connect(r, SIGNAL(gameCreated(Server_Game *)), this, SLOT(gameCreated(Server_Game *))); rooms.insert(r->getId(), r); enqueueProtocolItem(new Event_RoomSay(r->getId(), QString(), r->getJoinMessage())); diff --git a/common/server_protocolhandler.h b/common/server_protocolhandler.h index e8b4dfac6..075ba0cfb 100644 --- a/common/server_protocolhandler.h +++ b/common/server_protocolhandler.h @@ -91,7 +91,6 @@ private: ResponseCode processCommandHelper(Command *command, CommandContainer *cont); private slots: void pingClockTimeout(); - void gameCreated(Server_Game *game); public: Server_ProtocolHandler(Server *_server, QObject *parent = 0); ~Server_ProtocolHandler(); @@ -104,6 +103,7 @@ public: const QMap &getBuddyList() const { return buddyList; } const QMap &getIgnoreList() const { return ignoreList; } + void gameCreated(Server_Game *game); int getLastCommandTime() const { return timeRunning - lastDataReceived; } void processCommandContainer(CommandContainer *cont); virtual void sendProtocolItem(ProtocolItem *item, bool deleteItem = true) = 0; diff --git a/common/server_room.cpp b/common/server_room.cpp index 4e9182186..a80856923 100644 --- a/common/server_room.cpp +++ b/common/server_room.cpp @@ -77,6 +77,7 @@ void Server_Room::doCreateGame(const QString &description, const QString &passwo broadcastGameListUpdate(newGame); + creator->gameCreated(newGame); emit gameCreated(newGame); emit roomInfoChanged(); }