mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-09 21:42:27 +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:
parent
af6c3ec97d
commit
be493435cb
@ -47,8 +47,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,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user