add log macros for plugins
[src/app-framework-binder.git] / src / afb-api-dbus.c
index 52d449f..f4fd0eb 100644 (file)
@@ -16,6 +16,7 @@
  */
 
 #define _GNU_SOURCE
+#define NO_PLUGIN_VERBOSE_MACRO
 
 #include <stdlib.h>
 #include <string.h>
@@ -91,6 +92,10 @@ static struct api_dbus *make_api_dbus_3(int system, const char *path, size_t pat
                goto error2;
        }
        api->api++;
+       if (!afb_apis_is_valid_api_name(api->api)) {
+               errno = EINVAL;
+               goto error2;
+       }
 
        /* the name/interface is copied after the path */
        api->name = &api->path[pathlen + 1];