Fixed ERROR message when force-saving connector list to shared memory.
This commit is contained in:
parent
8d17d5f6c4
commit
42da518d5f
2 changed files with 11 additions and 5 deletions
|
@ -23,11 +23,17 @@ namespace Controller {
|
|||
static std::map<std::string, pid_t> currentConnectors; ///<The currently running connectors.
|
||||
|
||||
/// Updates the shared memory page with active connectors
|
||||
void saveActiveConnectors(){
|
||||
IPC::sharedPage f("MstCnns", 4096, true, false);
|
||||
void saveActiveConnectors(bool forceOverride){
|
||||
IPC::sharedPage f("MstCnns", 4096, forceOverride, false);
|
||||
if (!f.mapped){
|
||||
FAIL_MSG("Could not store connector data!");
|
||||
return;
|
||||
if (!forceOverride){
|
||||
saveActiveConnectors(true);
|
||||
return;
|
||||
}
|
||||
if (!f.mapped){
|
||||
FAIL_MSG("Could not store connector data!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
memset(f.mapped, 0, 32);
|
||||
Util::RelAccX A(f.mapped, false);
|
||||
|
|
|
@ -9,7 +9,7 @@ namespace Controller {
|
|||
bool CheckProtocols(JSON::Value & p, const JSON::Value & capabilities);
|
||||
|
||||
/// Updates the shared memory page with active connectors
|
||||
void saveActiveConnectors();
|
||||
void saveActiveConnectors(bool forceOverride = false);
|
||||
|
||||
/// Reads active connectors from the shared memory pages
|
||||
void loadActiveConnectors();
|
||||
|
|
Loading…
Add table
Reference in a new issue