X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafb-export.c;h=cabb485825e2a06782f0c8f98737a904345ea33c;hb=refs%2Fchanges%2F45%2F18045%2F1;hp=fdd4573f979fcdfe6da020167ddab538a624fc96;hpb=195a03d84c59ff756bfb893b22f8f4ff2635ceb6;p=src%2Fapp-framework-binder.git diff --git a/src/afb-export.c b/src/afb-export.c index fdd4573f..cabb4858 100644 --- a/src/afb-export.c +++ b/src/afb-export.c @@ -274,7 +274,7 @@ static void vverbose_cb(struct afb_api_x3 *closure, int level, const char *file, if (!fmt || vasprintf(&p, fmt, args) < 0) vverbose(level, file, line, function, fmt, args); else { - verbose(level, file, line, function, "[API %s] %s", export->api.apiname, p); + verbose(level, file, line, function, (verbose_is_colorized() == 0 ? "[API %s] %s" : COLOR_API "[API %s]" COLOR_DEFAULT " %s"), export->api.apiname, p); free(p); } } @@ -1172,7 +1172,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 {