improves api
authorJosé Bollo <jose.bollo@iot.bzh>
Wed, 4 May 2016 16:40:42 +0000 (18:40 +0200)
committerJosé Bollo <jose.bollo@iot.bzh>
Wed, 4 May 2016 16:51:20 +0000 (18:51 +0200)
Change-Id: Id76ab70174e758f26caf9f883595f6cc003147d3
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
src/afb-apis.c
src/afb-apis.h

index 2822575..bcb4242 100644 (file)
@@ -83,6 +83,11 @@ error:
        return -1;
 }
 
+void afb_apis_call_(struct afb_req req, struct AFB_clientCtx *context, const char *api, const char *verb)
+{
+       afb_apis_call(req, context, api, strlen(api), verb, strlen(verb));
+}
+
 void afb_apis_call(struct afb_req req, struct AFB_clientCtx *context, const char *api, size_t lenapi, const char *verb, size_t lenverb)
 {
        int i;
index 985923f..795054a 100644 (file)
@@ -30,5 +30,6 @@ struct afb_api
 extern int afb_apis_count();
 extern int afb_apis_add(const char *name, struct afb_api api);
 extern void afb_apis_call(struct afb_req req, struct AFB_clientCtx *context, const char *api, size_t lenapi, const char *verb, size_t lenverb);
+extern void afb_apis_call_(struct afb_req req, struct AFB_clientCtx *context, const char *api, const char *verb);