Call event handler only if event-label matches
authorMarcus Fritzsch <marcus_fritzsch@mentor.com>
Mon, 4 Sep 2017 14:05:06 +0000 (16:05 +0200)
committerMarcus Fritzsch <marcus_fritzsch@mentor.com>
Thu, 14 Sep 2017 12:04:51 +0000 (14:04 +0200)
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
AFBClient.cpp

index 99f22bd..cee49ad 100644 (file)
@@ -403,7 +403,9 @@ void AFBClient::Impl::event(char const *et, char const *label) {
 
     auto i = this->handlers.find(oet.second);
     if (i != this->handlers.end()) {
-        i->second(label);
+        if (this->labels.find(label) != this->labels.end()) {
+            i->second(label);
+        }
     }
 }