From a51cfc5b18807e8fbff9305b4bc7aeb32d2d25cd Mon Sep 17 00:00:00 2001 From: José Bollo Date: Tue, 12 Sep 2017 14:59:07 +0200 Subject: Fix initialisation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The binder now enforces creation of event inside init and forbid their creation in preinit. This evolution solves the issue as all initialisation is made in init. Change-Id: Ib5a41382ace47cbc387f0bce71bf7f198fea47ea Signed-off-by: José Bollo --- binding-bluetooth/bluetooth-api.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/binding-bluetooth/bluetooth-api.c b/binding-bluetooth/bluetooth-api.c index 3da59d9..56248b3 100644 --- a/binding-bluetooth/bluetooth-api.c +++ b/binding-bluetooth/bluetooth-api.c @@ -880,7 +880,7 @@ static int init() event_add("device_removed"); event_add("device_updated"); - return 0; + return BluetoothManagerInit(); } /* @@ -891,8 +891,7 @@ const struct afb_binding_v2 afbBindingV2 = .specification = "Application Framework Binder - Bluetooth Manager plugin", .api = "Bluetooth-Manager", .verbs = binding_verbs, - .preinit = init, - .init = BluetoothManagerInit, + .init = init, }; /***************************** The End Of File ******************************/ -- cgit