RFCOMM: Improve logging and readability
Debug Improvements:
* Add more error logging in the following methods:
- rfc_mx_sm_state_idle for L2CA_ConnectReq failure
- rfc_mx_sm_state_configure for RFC_EVENT_TIMEOUT
- rfc_mx_conf_cnf for L2CAP configuration failures
- RFCOMM_RemoveServer
Readability Improvements:
* Refactored logic in the following methods to be more readable
- L2CA_ErtmConnectReq
- RFCOMM_CreateConnection
- port_open_continue
- PORT_StartCnf
- port_allocate_port
- rfc_send_buf_uih
- bta_ag_get_other_idle_scb
* Rename RFCOMM_ParNegReq to RFCOMM_ParameterNegotiationRequest
* Rename RFCOMM_ParNegRsp to RFCOMM_ParameterNegotiationResponse
* Rename RFCOMM_PortNegReq to RFCOMM_PortParameterNegotiationRequest
* Rename RFCOMM_PortNegRsp to RFCOMM_PortParameterNegotiationResponse
Rename using IDE:
* Rename tRFCOMM_CB.last_port to tRFCOMM_CB.last_port_index
* Rename tPORT.inx to tPORT.handle as inx is ready the port handle
indexed from 1
* Rename tRFC_MCB.port_inx to tRFC_MCB.port_handles
NPE Prevention:
* Add error checking in rfc_save_lcid_mcb to avoid accessing beyond
array boundary
Bug: 77224743
Test: StackRfcommTest, connect and disconnect to multiple devices
with PBAP, MAP, PAN, PTS HFP tests
testplans/details/158641/3975
Change-Id: I8de89dfc0cee48fed6ad4e1d4a8cdcde2f960aab
Loading
Please register or sign in to comment