Fix assertion failure in btif_sock_rfc
The BTIF RFCOMM code was ignoring the status code on RFCOMM writes. In the failure case, the slot id is 0 which is invalid. But the slot id shouldn't even be referenced since the result was failure. Stack trace: __assert2+20 bionic/libc/bionic/assert.cpp:40 find_rfc_slot_by_id+18 system/bt/main/../btif/src/btif_sock_rfc.c:144 on_rfc_write_done system/bt/main/../btif/src/btif_sock_rfc.c:537 rfcomm_cback+632 system/bt/main/../btif/src/btif_sock_rfc.c:585 bta_jv_rfcomm_write+74 system/bt/bta/./jv/bta_jv_act.c:2121 bta_jv_sm_execute+18 system/bt/bta/./jv/bta_jv_main.c:93 bta_sys_event+56 system/bt/bta/./sys/bta_sys_main.c:523 run_reactor+254 system/bt/osi/./src/reactor.c:278 run_thread+142 system/bt/osi/./src/thread.c:209 __pthread_start(void*)+30 bionic/libc/bionic/pthread_create.cpp:199 __start_thread+6 bionic/libc/bionic/clone.cpp:41 Bug: 27819511 Change-Id: Ifcd19fdfb214559f345567f04db8146b30037363
Loading
Please register or sign in to comment