Pending enable method if the stack is not intialized 78/219178/2
authorDoHyun Pyun <dh79.pyun@samsung.com>
Tue, 3 Dec 2019 01:37:28 +0000 (10:37 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Tue, 3 Dec 2019 01:43:32 +0000 (10:43 +0900)
Change-Id: I7e5e63e1ef39a0f72569fa499dfcd19b9b59144f
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
bt-oal/oal-adapter-mgr.c

index 7fa21df..c1707d2 100644 (file)
@@ -153,7 +153,13 @@ oal_status_t adapter_enable(void)
        int ret = BT_STATUS_SUCCESS;
 
        API_TRACE();
-       CHECK_OAL_INITIALIZED();
+
+       if (blued_api == NULL) {
+               BT_INFO("Stack is initializing, so pending enable");
+               g_timeout_add(200, retry_enable_adapter, NULL);
+               return OAL_STATUS_PENDING;
+       }
+
        if (OAL_STATUS_SUCCESS != hw_is_module_ready()) {
                g_timeout_add(200, retry_enable_adapter, NULL);
                return OAL_STATUS_PENDING;