summaryrefslogtreecommitdiffstats
path: root/ctl-binding.c
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-08-22 11:15:42 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2018-12-13 14:58:22 +0100
commit2aea7b449c6cb58ef8c02146e47ebec418f8074d (patch)
treeec9869ba96328701ac8dd8291dd42687f9e5a453 /ctl-binding.c
parent4e5ece0f4f95882e91f8974cd9b129e1630e862b (diff)
Controller binding extraction from Audio-bindings
Change-Id: I494bf5163c218a6d499b8321797f5de693c284c2 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'ctl-binding.c')
-rw-r--r--ctl-binding.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/ctl-binding.c b/ctl-binding.c
index ec33f82..4f6ecd3 100644
--- a/ctl-binding.c
+++ b/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;
}
-
+