aboutsummaryrefslogtreecommitdiffstats
path: root/src/afb-api-so.c
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2016-05-18 11:11:19 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2016-05-18 11:11:19 +0200
commit5c1e761a2f84439b6e53ff1682ee665a7db2bca1 (patch)
treea17e89ab72ded846781bc7c3fd66bc4eb1ec4923 /src/afb-api-so.c
parentb4d45c6cbdd3d98706e16303dd7c55a0a0713a1f (diff)
adds detection of wrong names for apis
Change-Id: I5466879bc2d9a60992605bf2514f78d3121f8114 Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/afb-api-so.c')
-rw-r--r--src/afb-api-so.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/afb-api-so.c b/src/afb-api-so.c
index 9b7e994f..bcd8dbe0 100644
--- a/src/afb-api-so.c
+++ b/src/afb-api-so.c
@@ -187,6 +187,10 @@ int afb_api_so_add_plugin(const char *path)
ERROR("plugin [%s] bad prefix...", path);
goto error3;
}
+ if (!afb_apis_is_valid_api_name(desc->plugin->v1.prefix)) {
+ ERROR("plugin [%s] invalid prefix...", path);
+ goto error3;
+ }
if (desc->plugin->v1.info == NULL || *desc->plugin->v1.info == 0) {
ERROR("plugin [%s] bad description...", path);
goto error3;