Fix a template that use the wrong callback definition
authorLoïc Collignon <loic.collignon@iot.bzh>
Fri, 4 Jan 2019 14:31:02 +0000 (15:31 +0100)
committerLoïc Collignon <loic.collignon@iot.bzh>
Fri, 4 Jan 2019 15:54:52 +0000 (16:54 +0100)
It used the legacy callback definition instead of the good one.

Change-Id: I5ad6e881e9fb99f1076a6dfa9ded221ccfec4a03
Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>
include/afb/c++/binding-wrap.hpp

index d7707df..733c02a 100644 (file)
@@ -460,7 +460,7 @@ inline void call(const char *api, const char *verb, struct json_object *args, vo
 template <class T>
 inline void call(const char *api, const char *verb, struct json_object *args, void (*callback)(T*closure, struct json_object *result, const char *error, const char *info, afb_api_t api), T *closure)
 {
-       afb_service_call(api, verb, args, reinterpret_cast<void(*)(void*,int,json_object*,afb_api_t)>(callback), reinterpret_cast<void*>(closure));
+       afb_service_call(api, verb, args, reinterpret_cast<void(*)(void*,json_object*,const char*, const char*,afb_api_t)>(callback), reinterpret_cast<void*>(closure));
 }
 
 inline bool callsync(const char *api, const char *verb, struct json_object *args, struct json_object *&result, char *&error, char *&info)