mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-31 00:46:46 +00:00
Fix Shared Memory in Windows
- Windows does not allow paths as mutexes - Remove the config directory from the mutex name - This fix has the potential for collision of concerns on Windows when running multiple instances, but it is an unlikely scenario given port requirements
This commit is contained in:
@@ -44,8 +44,7 @@ namespace EQ {
|
|||||||
IPCMutex::IPCMutex(const std::string& name) : locked_(false) {
|
IPCMutex::IPCMutex(const std::string& name) : locked_(false) {
|
||||||
imp_ = new Implementation;
|
imp_ = new Implementation;
|
||||||
#ifdef _WINDOWS
|
#ifdef _WINDOWS
|
||||||
auto Config = EQEmuConfig::get();
|
std::string final_name = fmt::format("EQEmuMutex_{}", name);
|
||||||
std::string final_name = fmt::format("{}/EQEmuMutex_{}", Config->SharedMemDir, name);
|
|
||||||
|
|
||||||
imp_->mut_ = CreateMutex(nullptr,
|
imp_->mut_ = CreateMutex(nullptr,
|
||||||
FALSE,
|
FALSE,
|
||||||
|
|||||||
Reference in New Issue
Block a user