mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-24 14:16:31 +00:00
chore(Core/Worldserver): restyle worldserver lib with astyle (#3463)
This commit is contained in:
@@ -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 },
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user