chore(Core/Worldserver): restyle worldserver lib with astyle (#3463)

This commit is contained in:
Kargatum
2020-09-11 10:41:31 +07:00
committed by GitHub
parent c141be8684
commit d47d6d34f3
11 changed files with 139 additions and 137 deletions

View File

@@ -35,7 +35,7 @@ void ACSoapRunnable::run()
continue; // ran into an accept timeout
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
sLog->outDebug(LOG_FILTER_NETWORKIO, "ACSoap: 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);
sLog->outDebug(LOG_FILTER_NETWORKIO, "ACSoap: 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
@@ -151,7 +151,8 @@ void SOAPCommand::commandFinished(void* soapconnection, bool success)
////////////////////////////////////////////////////////////////////////////////
struct Namespace namespaces[] =
{ { "SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/", nullptr, nullptr }, // must be first
{
{ "SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/", nullptr, nullptr }, // must be first
{ "SOAP-ENC", "http://schemas.xmlsoap.org/soap/encoding/", nullptr, nullptr }, // must be second
{ "xsi", "http://www.w3.org/1999/XMLSchema-instance", "http://www.w3.org/*/XMLSchema-instance", NULL },
{ "xsd", "http://www.w3.org/1999/XMLSchema", "http://www.w3.org/*/XMLSchema", NULL },

View File

@@ -16,57 +16,57 @@
class ACSoapRunnable : public acore::Runnable
{
public:
ACSoapRunnable() : _port(0) { }
public:
ACSoapRunnable() : _port(0) { }
void run();
void run();
void SetListenArguments(const std::string& host, uint16 port)
{
_host = host;
_port = port;
}
void SetListenArguments(const std::string& host, uint16 port)
{
_host = host;
_port = port;
}
private:
void process_message(ACE_Message_Block* mb);
private:
void process_message(ACE_Message_Block* mb);
std::string _host;
uint16 _port;
std::string _host;
uint16 _port;
};
class SOAPCommand
{
public:
SOAPCommand(): pendingCommands(0, USYNC_THREAD, "pendingCommands"), m_success(false) {}
public:
SOAPCommand(): pendingCommands(0, USYNC_THREAD, "pendingCommands"), m_success(false) {}
~SOAPCommand() { }
~SOAPCommand() { }
void appendToPrintBuffer(const char* msg)
{
m_printBuffer += msg;
}
void appendToPrintBuffer(const char* msg)
{
m_printBuffer += msg;
}
ACE_Semaphore pendingCommands;
ACE_Semaphore pendingCommands;
void setCommandSuccess(bool val)
{
m_success = val;
}
void setCommandSuccess(bool val)
{
m_success = val;
}
bool hasCommandSucceeded() const
{
return m_success;
}
bool hasCommandSucceeded() const
{
return m_success;
}
static void print(void* callbackArg, const char* msg)
{
((SOAPCommand*)callbackArg)->appendToPrintBuffer(msg);
}
static void print(void* callbackArg, const char* msg)
{
((SOAPCommand*)callbackArg)->appendToPrintBuffer(msg);
}
static void commandFinished(void* callbackArg, bool success);
static void commandFinished(void* callbackArg, bool success);
bool m_success;
std::string m_printBuffer;
bool m_success;
std::string m_printBuffer;
};
#endif