#include <systemd/sd-bus.h>
#include <json-c/json.h>
-#include "afb-plugin.h"
-#include "afb-req-itf.h"
+#include <afb/afb-plugin.h>
+#include <afb/afb-req-itf.h>
#include "afb-common.h"
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];