summaryrefslogtreecommitdiff
path: root/src/worldserver/TCSoap/TCSoap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/worldserver/TCSoap/TCSoap.cpp')
-rw-r--r--src/worldserver/TCSoap/TCSoap.cpp24
1 files changed, 18 insertions, 6 deletions
diff --git a/src/worldserver/TCSoap/TCSoap.cpp b/src/worldserver/TCSoap/TCSoap.cpp
index 3c6a32fff0..6d2ce72d87 100644
--- a/src/worldserver/TCSoap/TCSoap.cpp
+++ b/src/worldserver/TCSoap/TCSoap.cpp
@@ -34,7 +34,9 @@ void TCSoapRunnable::run()
if (!soap_valid_socket(soap_accept(&soap)))
continue; // ran into an accept timeout
- ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "TCSoap: accepted connection from IP=%d.%d.%d.%d", (int)(soap.ip>>24)&0xFF, (int)(soap.ip>>16)&0xFF, (int)(soap.ip>>8)&0xFF, (int)soap.ip&0xFF);
+#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
+ sLog->outDebug(LOG_FILTER_NETWORKIO, "TCSoap: accepted connection from IP=%d.%d.%d.%d", (int)(soap.ip>>24)&0xFF, (int)(soap.ip>>16)&0xFF, (int)(soap.ip>>8)&0xFF, (int)soap.ip&0xFF);
+#endif
struct soap* thread_soap = soap_copy(&soap);// make a safe copy
ACE_Message_Block* mb = new ACE_Message_Block(sizeof(struct soap*));
@@ -69,33 +71,43 @@ int ns1__executeCommand(soap* soap, char* command, char** result)
// security check
if (!soap->userid || !soap->passwd)
{
- ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "TCSoap: Client didn't provide login information");
+#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
+ sLog->outDebug(LOG_FILTER_NETWORKIO, "TCSoap: Client didn't provide login information");
+#endif
return 401;
}
uint32 accountId = AccountMgr::GetId(soap->userid);
if (!accountId)
{
- ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "TCSoap: Client used invalid username '%s'", soap->userid);
+#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
+ sLog->outDebug(LOG_FILTER_NETWORKIO, "TCSoap: Client used invalid username '%s'", soap->userid);
+#endif
return 401;
}
if (!AccountMgr::CheckPassword(accountId, soap->passwd))
{
- ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "TCSoap: invalid password for account '%s'", soap->userid);
+#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
+ sLog->outDebug(LOG_FILTER_NETWORKIO, "TCSoap: invalid password for account '%s'", soap->userid);
+#endif
return 401;
}
if (AccountMgr::GetSecurity(accountId) < SEC_ADMINISTRATOR)
{
- ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "TCSoap: %s's gmlevel is too low", soap->userid);
+#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
+ sLog->outDebug(LOG_FILTER_NETWORKIO, "TCSoap: %s's gmlevel is too low", soap->userid);
+#endif
return 403;
}
if (!command || !*command)
return soap_sender_fault(soap, "Command can not be empty", "The supplied command was an empty string");
- ;//sLog->outDebug(LOG_FILTER_NETWORKIO, "TCSoap: got command '%s'", command);
+#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
+ sLog->outDebug(LOG_FILTER_NETWORKIO, "TCSoap: got command '%s'", command);
+#endif
SOAPCommand connection;
// commands are executed in the world thread. We have to wait for them to be completed