aboutsummaryrefslogtreecommitdiffstats
path: root/low-can-binding
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2019-11-14 12:51:29 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2020-01-09 14:40:41 +0100
commit7188915081966da4124a457da99354beefa7dbad (patch)
tree2bd59ba844b554c5046bb877a4c35e3940887244 /low-can-binding
parent7ea53d8a89912cd0ab00fa4c0957f40ee6c9db8a (diff)
low-can-cb: Retrieve application from external controller data
Bug-AGL: SPEC-2988 Change-Id: Iaa55b00539b1435b00fe076918d5eda5eeb5db30 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'low-can-binding')
-rw-r--r--low-can-binding/binding/low-can-cb.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/low-can-binding/binding/low-can-cb.cpp b/low-can-binding/binding/low-can-cb.cpp
index 0672e715..afc9c3eb 100644
--- a/low-can-binding/binding/low-can-cb.cpp
+++ b/low-can-binding/binding/low-can-cb.cpp
@@ -55,14 +55,13 @@ int config_low_can(afb_api_t apiHandle, CtlSectionT *section, json_object *json_
CtlConfigT *ctrlConfig;
ctrlConfig = (CtlConfigT *) afb_api_get_userdata(apiHandle);
- if(!ctrlConfig)
+ if(! ctrlConfig)
return -1;
- if(!section->handle)
+ if(! ctrlConfig->external)
return -1;
- application_t *application = (application_t*) section->handle;
-
+ application_t *application = (application_t*) ctrlConfig->external;
int active_message_set;
const char *diagnotic_bus = nullptr;
@@ -920,7 +919,7 @@ int init_binding(afb_api_t api)
return ret;
}
-int load_conf(afb_api_t api)
+int load_config(afb_api_t api)
{
int ret = 0;
CtlConfigT *ctlConfig;