From ada53f048b917b1e282a502191586405e0c923be Mon Sep 17 00:00:00 2001 From: athatheo <vostidi@hotmail.com> Date: Fri, 5 Apr 2019 18:43:29 +0300 Subject: [PATCH] - Changed executeAction according to the multimap needs --- src/Services/EventActionService.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Services/EventActionService.cpp b/src/Services/EventActionService.cpp index 668189a5..2eb47acd 100644 --- a/src/Services/EventActionService.cpp +++ b/src/Services/EventActionService.cpp @@ -182,11 +182,13 @@ void EventActionService::executeAction(uint16_t eventID) { // Custom function if (eventActionFunctionStatus) { if (eventActionDefinitionMap.find(eventID) != eventActionDefinitionMap.end()) { - if (eventActionDefinitionMap[eventID].enabled) { - MessageParser messageParser; - Message message = messageParser.parseRequestTC( - eventActionDefinitionMap[eventID].request); - messageParser.execute(message); + auto range = eventActionDefinitionMap.equal_range(eventID); + for (auto& element = range.first; element != range.second; ++element){ + if (element->second.enabled == true){ + MessageParser messageParser; + Message message = messageParser.parseRequestTC(element->second.request); + messageParser.execute(message); + } } } } -- GitLab