OSDN Git Service

android: Fix sending status on bluetooth init if already initialized
authorJakub Tyszkowski <jakub.tyszkowski@tieto.com>
Thu, 5 Dec 2013 10:37:12 +0000 (11:37 +0100)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Sun, 8 Dec 2013 15:47:42 +0000 (17:47 +0200)
We should be sending BT_STATUS_DONE when calling init on already
initialized interface like Bluedroid does. This indicates that previosly
registered callbacks are still registered, not those passed with second
init call.

android/hal-bluetooth.c

index 87d6fc7..7cac15c 100644 (file)
@@ -373,7 +373,7 @@ static int init(bt_callbacks_t *callbacks)
        DBG("");
 
        if (interface_ready())
-               return BT_STATUS_SUCCESS;
+               return BT_STATUS_DONE;
 
        bt_hal_cbacks = callbacks;