Loading system/btif/src/btif_sock_rfc.cc +14 −3 Original line number Diff line number Diff line Loading @@ -139,6 +139,8 @@ void btsock_rfc_cleanup(void) { } uid_set = NULL; LOG_DEBUG("cleanup finished"); } static rfc_slot_t* find_free_slot(void) { Loading Loading @@ -294,7 +296,10 @@ bt_status_t btsock_rfc_listen(const char* service_name, // error to call // functions on RFCOMM sockets before initializing the module. Probably // should be an assert. if (!is_init_done()) return BT_STATUS_NOT_READY; if (!is_init_done()) { LOG_ERROR("BT not ready"); return BT_STATUS_NOT_READY; } if ((flags & BTSOCK_FLAG_NO_SDP) == 0) { if (!service_uuid || service_uuid->IsEmpty()) { Loading Loading @@ -349,7 +354,10 @@ bt_status_t btsock_rfc_connect(const RawAddress* bd_addr, // error to call // functions on RFCOMM sockets before initializing the module. Probably should // be an assert. if (!is_init_done()) return BT_STATUS_NOT_READY; if (!is_init_done()) { LOG_ERROR("BT not ready"); return BT_STATUS_NOT_READY; } std::unique_lock<std::recursive_mutex> lock(slot_lock); Loading Loading @@ -1037,7 +1045,10 @@ int bta_co_rfc_data_outgoing(uint32_t id, uint8_t* buf, uint16_t size) { bt_status_t btsock_rfc_disconnect(const RawAddress* bd_addr) { CHECK(bd_addr != NULL); if (!is_init_done()) return BT_STATUS_NOT_READY; if (!is_init_done()) { LOG_ERROR("BT not ready"); return BT_STATUS_NOT_READY; } std::unique_lock<std::recursive_mutex> lock(slot_lock); for (size_t i = 0; i < ARRAY_SIZE(rfc_slots); ++i) { Loading Loading
system/btif/src/btif_sock_rfc.cc +14 −3 Original line number Diff line number Diff line Loading @@ -139,6 +139,8 @@ void btsock_rfc_cleanup(void) { } uid_set = NULL; LOG_DEBUG("cleanup finished"); } static rfc_slot_t* find_free_slot(void) { Loading Loading @@ -294,7 +296,10 @@ bt_status_t btsock_rfc_listen(const char* service_name, // error to call // functions on RFCOMM sockets before initializing the module. Probably // should be an assert. if (!is_init_done()) return BT_STATUS_NOT_READY; if (!is_init_done()) { LOG_ERROR("BT not ready"); return BT_STATUS_NOT_READY; } if ((flags & BTSOCK_FLAG_NO_SDP) == 0) { if (!service_uuid || service_uuid->IsEmpty()) { Loading Loading @@ -349,7 +354,10 @@ bt_status_t btsock_rfc_connect(const RawAddress* bd_addr, // error to call // functions on RFCOMM sockets before initializing the module. Probably should // be an assert. if (!is_init_done()) return BT_STATUS_NOT_READY; if (!is_init_done()) { LOG_ERROR("BT not ready"); return BT_STATUS_NOT_READY; } std::unique_lock<std::recursive_mutex> lock(slot_lock); Loading Loading @@ -1037,7 +1045,10 @@ int bta_co_rfc_data_outgoing(uint32_t id, uint8_t* buf, uint16_t size) { bt_status_t btsock_rfc_disconnect(const RawAddress* bd_addr) { CHECK(bd_addr != NULL); if (!is_init_done()) return BT_STATUS_NOT_READY; if (!is_init_done()) { LOG_ERROR("BT not ready"); return BT_STATUS_NOT_READY; } std::unique_lock<std::recursive_mutex> lock(slot_lock); for (size_t i = 0; i < ARRAY_SIZE(rfc_slots); ++i) { Loading