summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2018-11-16 11:37:54 +0100
committerJosé Bollo <jose.bollo@iot.bzh>2018-11-16 11:40:33 +0100
commit470abd47f759193e181bcb566d6d87bb75659efc (patch)
tree91888393bfa299e6d5330b8ce6771e917b7bbca0
parente2a3e5b9336f8ede14fb4323d75d38a70b90af3f (diff)
afb-export: Fix error in event handling
Change-Id: I2869a2a840fb07550d493ddc2d651358892d33d1 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
-rw-r--r--src/afb-export.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/afb-export.c b/src/afb-export.c
index e679b769..0892177e 100644
--- a/src/afb-export.c
+++ b/src/afb-export.c
@@ -1167,7 +1167,7 @@ static void listener_of_events(void *closure, const char *event, int eventid, st
/* search the handler */
handler = export->event_handlers;
while (handler) {
- if (fnmatch(handler->pattern, event, 0)) {
+ if (!fnmatch(handler->pattern, event, 0)) {
if (!(export->hooksvc & afb_hook_flag_api_on_event_handler))
handler->callback(handler->closure, event, object, to_api_x3(export));
else {