Core: Updated to 6.2.4

* Rewrite bnetserver for new authentication protocol
This commit is contained in:
Shauren
2016-03-28 17:12:57 +02:00
parent 619669c620
commit dde620c402
85 changed files with 9688 additions and 4976 deletions

View File

@@ -41,7 +41,7 @@
#include "GitRevision.h"
#include "WorldSocket.h"
#include "WorldSocketMgr.h"
#include "Realm/Realm.h"
#include "RealmList.h"
#include "DatabaseLoader.h"
#include "AppenderDB.h"
#include <openssl/opensslv.h>
@@ -49,6 +49,7 @@
#include <boost/asio/io_service.hpp>
#include <boost/asio/deadline_timer.hpp>
#include <boost/program_options.hpp>
#include <google/protobuf/stubs/common.h>
using namespace boost::program_options;
@@ -103,6 +104,8 @@ extern int main(int argc, char** argv)
if (vm.count("help") || vm.count("version"))
return 0;
GOOGLE_PROTOBUF_VERIFY_VERSION;
#ifdef _WIN32
if (configService.compare("install") == 0)
return WinServiceInstall() ? 0 : 1;
@@ -188,6 +191,8 @@ extern int main(int argc, char** argv)
// Set server offline (not connectable)
LoginDatabase.DirectPExecute("UPDATE realmlist SET flag = flag | %u WHERE id = '%d'", REALM_FLAG_OFFLINE, realm.Id.Realm);
sRealmList->Initialize(_ioService, sConfigMgr->GetIntDefault("RealmsStateUpdateDelay", 10));
LoadRealmInfo();
// Initialize the World
@@ -273,6 +278,7 @@ extern int main(int argc, char** argv)
// set server offline
LoginDatabase.DirectPExecute("UPDATE realmlist SET flag = flag | %u WHERE id = '%d'", REALM_FLAG_OFFLINE, realm.Id.Realm);
sRealmList->Close();
// Clean up threads if any
if (soapThread != nullptr)
@@ -294,6 +300,8 @@ extern int main(int argc, char** argv)
OpenSSLCrypto::threadsCleanup();
google::protobuf::ShutdownProtobufLibrary();
// 0 - normal shutdown
// 1 - shutdown at error
// 2 - restart command used, this code can be used by restarter for restart Trinityd