diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2017-08-22 11:15:42 +0200 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2017-08-22 11:15:42 +0200 |
commit | a7bb818826b3ba1165af5d87252d75b5166112b8 (patch) | |
tree | 4c3ffe13483f4795c43c487e8aae1eea4481cd78 /Controller-afb/ctl-binding.c | |
parent | 837905124166ea66da3f412520ba611dbc0e7660 (diff) |
Controller binding extraction from Audio-bindings
Change-Id: I494bf5163c218a6d499b8321797f5de693c284c2
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'Controller-afb/ctl-binding.c')
-rw-r--r-- | Controller-afb/ctl-binding.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/Controller-afb/ctl-binding.c b/Controller-afb/ctl-binding.c index ec33f82..4f6ecd3 100644 --- a/Controller-afb/ctl-binding.c +++ b/Controller-afb/ctl-binding.c @@ -20,7 +20,6 @@ #include <string.h> #include <time.h> -#include "audio-common.h" #include "ctl-binding.h" @@ -30,17 +29,17 @@ PUBLIC void ctlapi_monitor (afb_req request) { - - // subscribe Client to event + + // subscribe Client to event int err = afb_req_subscribe(request, TimerEvtGet()); if (err != 0) { afb_req_fail_f(request, "register-event", "Fail to subscribe binder event"); goto OnErrorExit; } - + afb_req_success(request, NULL, NULL); - OnErrorExit: + OnErrorExit: return; } @@ -48,21 +47,21 @@ PUBLIC void ctlapi_monitor (afb_req request) { PUBLIC int CtlBindingInit () { int errcount=0; - + errcount += TimerEvtInit(); errcount += DispatchInit(); -#ifdef CONTROL_SUPPORT_LUA +#ifdef CONTROL_SUPPORT_LUA errcount += LuaLibInit(); #endif - + const char *profile= getenv("CONTROL_ONLOAD_PROFILE"); if (!profile) profile=CONTROL_ONLOAD_PROFILE; - + // now that everything is initialised execute the onload action - if (!errcount) + if (!errcount) errcount += DispatchOnLoad(CONTROL_ONLOAD_PROFILE); - + AFB_DEBUG ("Audio Policy Control Binding Done errcount=%d", errcount); return errcount; } - + |