X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2Fafb-api.c;h=54ee5945f24704b44c746051b51157a5e29c9091;hb=c8558c8a28966110aa3a356f95d3c60afe32b64a;hp=bb172d7e5ecb8f99be470fc4db45337b4e9ee779;hpb=a8e971702f23ee67e02b4716ad4159f12cefdca6;p=src%2Fapp-framework-binder.git diff --git a/src/afb-api.c b/src/afb-api.c index bb172d7e..54ee5945 100644 --- a/src/afb-api.c +++ b/src/afb-api.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016, 2017 "IoT.bzh" + * Copyright (C) 2016, 2017, 2018 "IoT.bzh" * Author "Fulup Ar Foll" * Author José Bollo * @@ -29,7 +29,7 @@ * Checks wether 'name' is a valid API name. * @return 1 if valid, 0 otherwise */ -int afb_api_is_valid_name(const char *name) +int afb_api_is_valid_name(const char *name, int hookable) { unsigned char c; @@ -44,6 +44,7 @@ int afb_api_is_valid_name(const char *name) default: if (c > ' ') break; + /*@fallthrough@*/ case '"': case '#': case '%': @@ -59,6 +60,6 @@ int afb_api_is_valid_name(const char *name) } c = (unsigned char)*++name; } while(c != 0); - return 1; + return !hookable || afb_api_is_hookable(name); }