Only re-write trigger pages if trigger configuration has changed

This commit is contained in:
Thulinma 2018-12-05 00:19:35 +01:00
parent 4370896f79
commit ca755039e1

View file

@ -333,8 +333,11 @@ namespace Controller{
/*LTS-START*/
static std::map<std::string, IPC::sharedPage> pageForType; // should contain one page for every trigger type
static JSON::Value writtenTrigs;
char tmpBuf[NAME_BUFFER_SIZE];
if (writtenTrigs != Storage["config"]["triggers"]){
writtenTrigs = Storage["config"]["triggers"];
// for all shm pages that hold triggers
pageForType.clear();
@ -412,6 +415,7 @@ namespace Controller{
tPage.setEndPos(std::min(i, max));
}
}
}
static bool serverStartTriggered;
if (!serverStartTriggered){