Skip to content
Snippets Groups Projects
Commit f7873507 authored by Jack He's avatar Jack He
Browse files

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
parent 3dfb5f8a
No related branches found
No related tags found
No related merge requests found
Showing
with 393 additions and 380 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment