From 421b77dacd67e6115ee546fca2f883a89cbf7c87 Mon Sep 17 00:00:00 2001 From: Thulinma Date: Mon, 13 Nov 2017 16:08:05 +0100 Subject: [PATCH] Fixed starting the controller with a locked session cache. --- src/controller/controller_statistics.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/controller/controller_statistics.cpp b/src/controller/controller_statistics.cpp index 3125e786..24f5f260 100644 --- a/src/controller/controller_statistics.cpp +++ b/src/controller/controller_statistics.cpp @@ -317,6 +317,8 @@ void Controller::SharedMemStats(void * config){ statPointer = &statServer; shmSessions = new IPC::sharedPage(SHM_SESSIONS, SHM_SESSIONS_SIZE, true); cacheLock = new IPC::semaphore(SEM_SESSCACHE, O_CREAT | O_RDWR, ACCESSPERMS, 1); + cacheLock->unlink(); + cacheLock->open(SEM_SESSCACHE, O_CREAT | O_RDWR, ACCESSPERMS, 1); std::set inactiveStreams; while(((Util::Config*)config)->is_active){ {