Code Review
/
src
/
app-framework-binder.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
afb-supervision: Fix error on 'trace'
[src/app-framework-binder.git]
/
src
/
afb-api-so-v2.c
diff --git
a/src/afb-api-so-v2.c
b/src/afb-api-so-v2.c
index
fef6eb2
..
5954eb1
100644
(file)
--- a/
src/afb-api-so-v2.c
+++ b/
src/afb-api-so-v2.c
@@
-67,7
+67,8
@@
static void call_cb(void *closure, struct afb_xreq *xreq)
struct api_so_v2 *desc = closure;
const struct afb_verb_v2 *verb;
struct api_so_v2 *desc = closure;
const struct afb_verb_v2 *verb;
- verb = search(desc, xreq->verb);
+ xreq->request.dynapi = (void*)desc->export; /* hack: this avoids to export afb_export structure */
+ verb = search(desc, xreq->request.verb);
afb_xreq_call_verb_v2(xreq, verb);
}
afb_xreq_call_verb_v2(xreq, verb);
}
@@
-168,7
+169,7
@@
int afb_api_so_v2_add_binding(const struct afb_binding_v2 *binding, void *handle
assert(data);
/* allocates the description */
assert(data);
/* allocates the description */
- export = afb_export_create_v2(binding->api, data, binding->init, binding->onevent);
+ export = afb_export_create_v2(
apiset,
binding->api, data, binding->init, binding->onevent);
desc = calloc(1, sizeof *desc);
if (!desc || !export) {
ERROR("out of memory");
desc = calloc(1, sizeof *desc);
if (!desc || !export) {
ERROR("out of memory");
@@
-229,7
+230,7
@@
int afb_api_so_v2_add(const char *path, void *handle, struct afb_apiset *apiset)
ERROR("binding [%s] bad api name...", path);
goto error;
}
ERROR("binding [%s] bad api name...", path);
goto error;
}
- if (!afb_api_is_valid_name(binding->api)) {
+ if (!afb_api_is_valid_name(binding->api
, 1
)) {
ERROR("binding [%s] invalid api name...", path);
goto error;
}
ERROR("binding [%s] invalid api name...", path);
goto error;
}