cur_inst is the copy of ots_client instance to prevent duplicate API call while client is in middle of read/write procedure. But cur_inst can only be cleared while write_obj_tx_done or read rx_done. If ACL is disconnected while read/write is on-going, there is no chance for cur_inst being cleared. This causes ots client will no longer perform select/read/write procedure anymore. API will always return -EBUSY. Let l2cap_disconnect check if cur_inst is NULL and NULL it unconditionally as what it is designed. Make bt_ots_client_unregister public API. Signed-off-by: Pirun Lee <pirun.lee@nordicsemi.no> |
||
|---|---|---|
| .. | ||
| CMakeLists.txt | ||
| Kconfig | ||
| ots_client_internal.h | ||
| ots_client.c | ||
| ots_dir_list_internal.h | ||
| ots_dir_list.c | ||
| ots_internal.h | ||
| ots_l2cap_internal.h | ||
| ots_l2cap.c | ||
| ots_oacp_internal.h | ||
| ots_oacp.c | ||
| ots_obj_manager_internal.h | ||
| ots_obj_manager.c | ||
| ots_olcp_internal.h | ||
| ots_olcp.c | ||
| ots.c | ||