diff --git a/src/Services/EventActionService.cpp b/src/Services/EventActionService.cpp index edd688e411fccfe472b190cefd952dcddb11e5e5..2067190eaec6d45a943885194df8ac7cf5eb663e 100644 --- a/src/Services/EventActionService.cpp +++ b/src/Services/EventActionService.cpp @@ -183,8 +183,10 @@ void EventActionService::executeAction(uint16_t eventID) { } i++; } - MessageParser messageParser; - Message message = messageParser.parseRequestTC(eventActionDefinitionArray[i].request); - messageParser.execute(message); + if (i != 256){ // If i == 256 that means that no matching eventId was found + MessageParser messageParser; + Message message = messageParser.parseRequestTC(eventActionDefinitionArray[i].request); + messageParser.execute(message); + } } } diff --git a/src/Services/EventReportService.cpp b/src/Services/EventReportService.cpp index 8190f87f9900a7846c112fdbaafd894260445b53..f24dfac7943da3a1f7d30853790976769b18fe78 100644 --- a/src/Services/EventReportService.cpp +++ b/src/Services/EventReportService.cpp @@ -12,10 +12,10 @@ void EventReportService::informativeEventReport(Event eventID, String<64> data) Message report = createTM(1); report.appendEnum16(eventID); report.appendString(data); + EventActionService eventActionService; +// eventActionService.executeAction(eventID); storeMessage(report); - EventActionService eventActionService; - eventActionService.executeAction(eventID); } } diff --git a/test/Services/EventActionService.cpp b/test/Services/EventActionService.cpp index e783b1a1643eec5f17063eea67a0b221ee4b5174..3fe04d023f19545266c88eab2bc72289887357c0 100644 --- a/test/Services/EventActionService.cpp +++ b/test/Services/EventActionService.cpp @@ -5,11 +5,12 @@ #include <cstring> TEST_CASE("Add event-action definitions TC[19,1]", "[service][st09]") { - + EventActionService eventActionService; + Message message(19, 1, Message::TC, 0); } TEST_CASE("Delete event-action definitions TC[19,2]", "[service][st09]") { - + } TEST_CASE("Delete all event-action definitions TC[19,3]", "[service][st09]") {