From a46cbcffe896e51f2e741c2c8871cc39f6d7c05b Mon Sep 17 00:00:00 2001 From: Jason Dellaluce Date: Wed, 3 Aug 2022 12:55:30 +0000 Subject: [PATCH] fix(engine): index old version of events in rulesets Co-authored-by: Andrea Terzolo Signed-off-by: Jason Dellaluce --- userspace/engine/filter_evttype_resolver.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/userspace/engine/filter_evttype_resolver.cpp b/userspace/engine/filter_evttype_resolver.cpp index 911f2416..cf23b6e4 100644 --- a/userspace/engine/filter_evttype_resolver.cpp +++ b/userspace/engine/filter_evttype_resolver.cpp @@ -48,9 +48,8 @@ void filter_evttype_resolver::visitor::evttypes(string evtname, set& o const struct ppm_event_info* etable = g_infotables.m_event_info; for(uint16_t i = 2; i < PPM_EVENT_MAX; i++) { - // Skip "old" event versions, unused events, or events not matching - // the requested evtname - if(!(etable[i].flags & (EF_OLD_VERSION | EF_UNUSED)) + // Skip unused events or events not matching the requested evtname + if(!(etable[i].flags & EF_UNUSED) && (evtname.empty() || string(etable[i].name) == evtname)) { out.insert(i);