Core/RA: Calculate password hash internally instead of sending plaintext password to mysql.
Convert tabs to spaces. --HG-- branch : trunk
This commit is contained in:
1 parent
e3c68e4ada
commit
4f468f9552
3 files changed
+221
-218
No files matched your search
@@ -35,59 +35,59 @@
|
||||
|
||||
RARunnable::RARunnable() : m_Reactor(NULL)
|
||||
{
|
||||
ACE_Reactor_Impl* imp = 0;
|
||||
ACE_Reactor_Impl* imp = 0;
|
||||
|
||||
#if defined (ACE_HAS_EVENT_POLL) || defined (ACE_HAS_DEV_POLL)
|
||||
|
||||
imp = new ACE_Dev_Poll_Reactor();
|
||||
imp = new ACE_Dev_Poll_Reactor();
|
||||
|
||||
imp->max_notify_iterations (128);
|
||||
imp->restart (1);
|
||||
imp->max_notify_iterations (128);
|
||||
imp->restart (1);
|
||||
|
||||
#else
|
||||
|
||||
imp = new ACE_TP_Reactor();
|
||||
imp->max_notify_iterations (128);
|
||||
imp = new ACE_TP_Reactor();
|
||||
imp->max_notify_iterations (128);
|
||||
|
||||
#endif
|
||||
|
||||
m_Reactor = new ACE_Reactor (imp, 1);
|
||||
m_Reactor = new ACE_Reactor (imp, 1);
|
||||
}
|
||||
|
||||
RARunnable::~RARunnable()
|
||||
{
|
||||
delete m_Reactor;
|
||||
delete m_Reactor;
|
||||
}
|
||||
|
||||
void RARunnable::run()
|
||||
{
|
||||
if (!sConfig.GetBoolDefault("Ra.Enable", false))
|
||||
return;
|
||||
if (!sConfig.GetBoolDefault("Ra.Enable", false))
|
||||
return;
|
||||
|
||||
ACE_Acceptor<RASocket, ACE_SOCK_ACCEPTOR> acceptor;
|
||||
ACE_Acceptor<RASocket, ACE_SOCK_ACCEPTOR> acceptor;
|
||||
|
||||
uint16 raport = sConfig.GetIntDefault("Ra.Port", 3443);
|
||||
std::string stringip = sConfig.GetStringDefault("Ra.IP", "0.0.0.0");
|
||||
uint16 raport = sConfig.GetIntDefault("Ra.Port", 3443);
|
||||
std::string stringip = sConfig.GetStringDefault("Ra.IP", "0.0.0.0");
|
||||
|
||||
ACE_INET_Addr listen_addr(raport, stringip.c_str());
|
||||
ACE_INET_Addr listen_addr(raport, stringip.c_str());
|
||||
|
||||
if (acceptor.open(listen_addr, m_Reactor) == -1)
|
||||
{
|
||||
sLog.outError("Trinity RA can not bind to port %d on %s", raport, stringip.c_str());
|
||||
return;
|
||||
}
|
||||
if (acceptor.open(listen_addr, m_Reactor) == -1)
|
||||
{
|
||||
sLog.outError("Trinity RA can not bind to port %d on %s", raport, stringip.c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
sLog.outString("Starting Trinity RA on port %d on %s", raport, stringip.c_str());
|
||||
sLog.outString("Starting Trinity RA on port %d on %s", raport, stringip.c_str());
|
||||
|
||||
while (!World::IsStopped())
|
||||
{
|
||||
// don't be too smart to move this outside the loop
|
||||
// the run_reactor_event_loop will modify interval
|
||||
ACE_Time_Value interval(0, 100000);
|
||||
while (!World::IsStopped())
|
||||
{
|
||||
// don't be too smart to move this outside the loop
|
||||
// the run_reactor_event_loop will modify interval
|
||||
ACE_Time_Value interval(0, 100000);
|
||||
|
||||
if (m_Reactor->run_reactor_event_loop(interval) == -1)
|
||||
break;
|
||||
}
|
||||
if (m_Reactor->run_reactor_event_loop(interval) == -1)
|
||||
break;
|
||||
}
|
||||
|
||||
sLog.outStaticDebug("Trinity RA thread exiting");
|
||||
sLog.outStaticDebug("Trinity RA thread exiting");
|
||||
}
|
||||
Reference in new issue
Block a user