Merge branch 'development' into LTS_development

# Conflicts:
#	src/controller/controller.cpp
#	src/controller/controller_statistics.cpp
This commit is contained in:
Thulinma 2019-05-23 13:31:41 +02:00
commit fd927c5e39
2 changed files with 11 additions and 5 deletions

View file

@ -24,11 +24,17 @@ namespace Controller {
static std::map<std::string, pid_t> currentConnectors; ///<The currently running connectors. static std::map<std::string, pid_t> currentConnectors; ///<The currently running connectors.
/// Updates the shared memory page with active connectors /// Updates the shared memory page with active connectors
void saveActiveConnectors(){ void saveActiveConnectors(bool forceOverride){
IPC::sharedPage f("MstCnns", 4096, true, false); IPC::sharedPage f("MstCnns", 4096, forceOverride, false);
if (!f.mapped){ if (!f.mapped){
FAIL_MSG("Could not store connector data!"); if (!forceOverride){
return; saveActiveConnectors(true);
return;
}
if (!f.mapped){
FAIL_MSG("Could not store connector data!");
return;
}
} }
memset(f.mapped, 0, 32); memset(f.mapped, 0, 32);
Util::RelAccX A(f.mapped, false); Util::RelAccX A(f.mapped, false);

View file

@ -9,7 +9,7 @@ namespace Controller {
bool CheckProtocols(JSON::Value & p, const JSON::Value & capabilities); bool CheckProtocols(JSON::Value & p, const JSON::Value & capabilities);
/// Updates the shared memory page with active connectors /// Updates the shared memory page with active connectors
void saveActiveConnectors(); void saveActiveConnectors(bool forceOverride = false);
/// Reads active connectors from the shared memory pages /// Reads active connectors from the shared memory pages
void loadActiveConnectors(); void loadActiveConnectors();