From fa0ac8371f79e225e3577fa5b63f887f1bd7ad19 Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Wed, 27 Jun 2018 10:52:40 +0200 Subject: Make the require_api at the right step. Also ConfigExec isn't needed to be at the outside of the init step as we don't need to call the dynapi Change-Id: Id4c4d063137f8afdc84fbc3cdcc37a964baa2a66 Signed-off-by: Romain Forlot --- src/test-binding.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/test-binding.c b/src/test-binding.c index 33a8807..641dfc4 100644 --- a/src/test-binding.c +++ b/src/test-binding.c @@ -63,10 +63,12 @@ static int CtrlLoadStaticVerbs(afb_dynapi *apiHandle, AFB_ApiVerbs *verbs) { }; static int CtrlInitOneApi(AFB_ApiT apiHandle) { - int err = 0; - AFB_default = apiHandle; // hugely hack to make all V2 AFB_DEBUG to work in fileutils + // Hugely hack to make all V2 AFB_DEBUG to work in fileutils + AFB_default = apiHandle; - return err; + CtlConfigT *ctrlConfig = afb_dynapi_get_userdata(apiHandle); + + return CtlConfigExec(apiHandle, ctrlConfig); } // next generation dynamic API-V3 mode @@ -155,11 +157,5 @@ int afbBindingVdyn(afb_dynapi *apiHandle) { // create one API per config file (Pre-V3 return code ToBeChanged) status = afb_dynapi_new_api(apiHandle, ctrlConfig->api, ctrlConfig->info, 1, CtrlLoadOneApi, ctrlConfig); - err = CtlConfigExec(apiHandle, ctrlConfig); - if(err) { - AFB_ApiError(apiHandle, "Error at CtlConfigExec step"); - return err; - } - return status; } -- cgit 1.2.3-korg