diff --git a/NEWS.txt b/NEWS.txt index 604b7322a..2d73d030e 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -5,6 +5,7 @@ MMapper 2.3.3 (January 18, 2015) Changes: - [GroupManager] Player's hp, mana, and moves are now correctly updated (nschimme) - [GroupManager] Player's room name has been moved into the far right column (nschimme) + - [GroupManager] Linux and Mac hosts can now accept incoming connections (nschimme) - Prompts should not be displayed after an internal command like _help is run (nschimme) - Added new _vote command and menu action to vote for MUME on TMC (nschimme) diff --git a/src/pandoragroup/CGroupClient.cpp b/src/pandoragroup/CGroupClient.cpp index e9170b190..a469bab60 100644 --- a/src/pandoragroup/CGroupClient.cpp +++ b/src/pandoragroup/CGroupClient.cpp @@ -58,7 +58,7 @@ CGroupClient::CGroupClient(QObject *parent) : linkSignals(); } -void CGroupClient::setSocket(int socketDescriptor) +void CGroupClient::setSocket(qintptr socketDescriptor) { if (setSocketDescriptor(socketDescriptor) == false) { // failure ... what to do? diff --git a/src/pandoragroup/CGroupClient.h b/src/pandoragroup/CGroupClient.h index cecfcb580..8abcc3cc6 100644 --- a/src/pandoragroup/CGroupClient.h +++ b/src/pandoragroup/CGroupClient.h @@ -52,7 +52,7 @@ class CGroupClient : public QTcpSocket CGroupClient(QByteArray host, int remotePort, QObject *parent); virtual ~CGroupClient(); - void setSocket(int socketDescriptor); + void setSocket(qintptr socketDescriptor); int getConnectionState() {return connectionState; } void setConnectionState(int val); diff --git a/src/pandoragroup/CGroupServer.cpp b/src/pandoragroup/CGroupServer.cpp index 7d261e174..dc98f742a 100644 --- a/src/pandoragroup/CGroupServer.cpp +++ b/src/pandoragroup/CGroupServer.cpp @@ -31,7 +31,7 @@ CGroupServer::CGroupServer(int localPort, QObject *parent) : QTcpServer(parent) { - printf("Creating the GroupManager Server.\r\n"); + qDebug("Creating the GroupManager Server.\r\n"); if (listen(QHostAddress::Any, localPort) != true) { getCommunicator()->sendLog("Failed to start a group Manager server!"); getCommunicator()->serverStartupFailed(); @@ -45,7 +45,7 @@ CGroupServer::~CGroupServer() } -void CGroupServer::incomingConnection(int socketDescriptor) +void CGroupServer::incomingConnection(qintptr socketDescriptor) { getCommunicator()->sendLog("Incoming connection"); // connect the client straight to the Communicator, as he handles all the state changes @@ -85,10 +85,9 @@ void CGroupServer::sendToAllExceptOne(CGroupClient *conn, QByteArray message) void CGroupServer::closeAll() { - - printf("Closing connections\r\n"); + qDebug("Closing connections\r\n"); for (int i = 0; i < connections.size(); i++) { - printf("Closing connections %i\r\n", connections[i]->socketDescriptor()); + qDebug("Closing connections ", connections[i]->socketDescriptor(), "\r\n"); connections[i]->deleteLater(); } } diff --git a/src/pandoragroup/CGroupServer.h b/src/pandoragroup/CGroupServer.h index 5c8e4f213..9abadacea 100644 --- a/src/pandoragroup/CGroupServer.h +++ b/src/pandoragroup/CGroupServer.h @@ -47,7 +47,7 @@ class CGroupServer: public QTcpServer void closeAll(); protected: - void incomingConnection(int socketDescriptor); + void incomingConnection(qintptr socketDescriptor); public slots: void connectionClosed(CGroupClient *connection);