From 7188915081966da4124a457da99354beefa7dbad Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Thu, 14 Nov 2019 12:51:29 +0100 Subject: low-can-cb: Retrieve application from external controller data Bug-AGL: SPEC-2988 Change-Id: Iaa55b00539b1435b00fe076918d5eda5eeb5db30 Signed-off-by: Romain Forlot --- low-can-binding/binding/low-can-cb.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'low-can-binding') 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; -- cgit 1.2.3-korg