From f71d894a215ed7cd9052913c9b07c8f62f0e99ca Mon Sep 17 00:00:00 2001 From: Nay Date: Sun, 28 Jul 2013 16:59:07 +0100 Subject: Servers: Fix some code style issues in world and authserver --- src/server/worldserver/TCSoap/TCSoap.cpp | 8 +++----- src/server/worldserver/TCSoap/TCSoap.h | 19 +++++++++++-------- 2 files changed, 14 insertions(+), 13 deletions(-) (limited to 'src/server/worldserver/TCSoap') diff --git a/src/server/worldserver/TCSoap/TCSoap.cpp b/src/server/worldserver/TCSoap/TCSoap.cpp index 3ccc3bccac9..e10968bcbee 100644 --- a/src/server/worldserver/TCSoap/TCSoap.cpp +++ b/src/server/worldserver/TCSoap/TCSoap.cpp @@ -33,13 +33,13 @@ void TCSoapRunnable::run() soap.accept_timeout = 3; soap.recv_timeout = 5; soap.send_timeout = 5; - if (!soap_valid_socket(soap_bind(&soap, m_host.c_str(), m_port, 100))) + if (!soap_valid_socket(soap_bind(&soap, _host.c_str(), _port, 100))) { - TC_LOG_ERROR(LOG_FILTER_SOAP, "Couldn't bind to %s:%d", m_host.c_str(), m_port); + TC_LOG_ERROR(LOG_FILTER_SOAP, "Couldn't bind to %s:%d", _host.c_str(), _port); exit(-1); } - TC_LOG_INFO(LOG_FILTER_SOAP, "Bound to http://%s:%d", m_host.c_str(), m_port); + TC_LOG_INFO(LOG_FILTER_SOAP, "Bound to http://%s:%d", _host.c_str(), _port); while (!World::IsStopped()) { @@ -121,9 +121,7 @@ int ns1__executeCommand(soap* soap, char* command, char** result) int acc = connection.pendingCommands.acquire(); if (acc) - { TC_LOG_ERROR(LOG_FILTER_SOAP, "Error while acquiring lock, acc = %i, errno = %u", acc, errno); - } // alright, command finished diff --git a/src/server/worldserver/TCSoap/TCSoap.h b/src/server/worldserver/TCSoap/TCSoap.h index 63ccb6b304e..ff2a49a4d7e 100644 --- a/src/server/worldserver/TCSoap/TCSoap.h +++ b/src/server/worldserver/TCSoap/TCSoap.h @@ -24,21 +24,24 @@ #include #include -class TCSoapRunnable: public ACE_Based::Runnable +class TCSoapRunnable : public ACE_Based::Runnable { public: - TCSoapRunnable() : m_host(""), m_port(0) { } - void run(); - void setListenArguments(std::string host, uint16 port) + TCSoapRunnable() : _port(0) { } + + void run() OVERRIDE; + + void SetListenArguments(const std::string& host, uint16 port) { - m_host = host; - m_port = port; + _host = host; + _port = port; } + private: void process_message(ACE_Message_Block* mb); - std::string m_host; - uint16 m_port; + std::string _host; + uint16 _port; }; class SOAPCommand -- cgit v1.2.3