mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-02 23:40:26 +00:00
Warning fixes, general cleanup (#5053)
This commit is contained in:
@@ -24,8 +24,7 @@
|
||||
#include "common/http/httplib.h"
|
||||
#include "common/http/uri.h"
|
||||
#include "common/ip_util.h"
|
||||
#include "common/net/console_server.h"
|
||||
#include "common/net/servertalk_server.h"
|
||||
#include "common/net/dns.h"
|
||||
#include "common/path_manager.h"
|
||||
#include "common/repositories/character_expedition_lockouts_repository.h"
|
||||
#include "common/repositories/character_task_timers_repository.h"
|
||||
@@ -33,7 +32,6 @@
|
||||
#include "common/rulesys.h"
|
||||
#include "common/strings.h"
|
||||
#include "common/zone_store.h"
|
||||
#include "common/zone_store.h"
|
||||
#include "world/adventure_manager.h"
|
||||
#include "world/dynamic_zone_manager.h"
|
||||
#include "world/login_server_list.h"
|
||||
@@ -49,8 +47,6 @@
|
||||
|
||||
extern WorldConfig Config;
|
||||
|
||||
auto mutex = new Mutex;
|
||||
|
||||
void WorldBoot::GMSayHookCallBackProcessWorld(uint16 log_category, const char *func, std::string message)
|
||||
{
|
||||
// we don't want to loop up with chat messages
|
||||
@@ -180,11 +176,13 @@ bool WorldBoot::LoadDatabaseConnections()
|
||||
}
|
||||
else {
|
||||
content_db.SetMySQL(database);
|
||||
|
||||
// when database and content_db share the same underlying mysql connection
|
||||
// it needs to be protected by a shared mutex otherwise we produce concurrency issues
|
||||
// when database actions are occurring in different threads
|
||||
database.SetMutex(mutex);
|
||||
content_db.SetMutex(mutex);
|
||||
std::shared_ptr<DBcore::Mutex> sharedMutex = std::make_shared<DBcore::Mutex>();
|
||||
database.SetMutex(sharedMutex);
|
||||
content_db.SetMutex(sharedMutex);
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -456,7 +454,7 @@ void WorldBoot::CheckForPossibleConfigurationIssues()
|
||||
|
||||
std::string config_address = c->WorldAddress;
|
||||
if (!IpUtil::IsIPAddress(config_address)) {
|
||||
config_address = IpUtil::DNSLookupSync(c->WorldAddress, 9000);
|
||||
config_address = EQ::Net::DNSLookupSync(c->WorldAddress, 9000);
|
||||
LogInfo(
|
||||
"World config address using DNS [{}] resolves to [{}]",
|
||||
c->WorldAddress,
|
||||
@@ -634,7 +632,6 @@ void WorldBoot::CheckForPossibleConfigurationIssues()
|
||||
|
||||
void WorldBoot::Shutdown()
|
||||
{
|
||||
safe_delete(mutex);
|
||||
}
|
||||
|
||||
void WorldBoot::SendDiscordMessage(int webhook_id, const std::string &message)
|
||||
|
||||
Reference in New Issue
Block a user