Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(nimble): Handled error return value while removing RPA list from … #1605

Merged
merged 1 commit into from
Oct 10, 2023

Conversation

ESPAbhinav
Copy link
Contributor

To remove the device from the RPA List ble_gap_unpair() API is used which sends a command to the controller. This command shall not be used when address resolution is enabled in the
Controller and:

  • Advertising (other than periodic advertising) is enabled,
  • Scanning is enabled, or
  • an HCI_LE_Create_Connection, HCI_LE_Extended_Create_Connection, or
    HCI_LE_Periodic_Advertising_Create_Sync command is pending.

An error check is added for the API ble_hs_pvcy_remove_entry which is invoked by ble_gap_unpair().

Copy link
Contributor

@sjanc sjanc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,

looks ok, just small nitpick about coding style
Also commit message should follow our convention, eg:

"nimble/host: Fix not handling error on RL element removal

If address resolution is enabled in controller it will reject
any RL modification. This could lead to leaving entry on RL
while removing bonding information"

@@ -6060,8 +6061,11 @@ ble_gap_unpair(const ble_addr_t *peer_addr)

ble_hs_unlock();

ble_hs_pvcy_remove_entry(peer_addr->type,
rc = ble_hs_pvcy_remove_entry(peer_addr->type,
peer_addr->val);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation needs fixing

@sjanc sjanc merged commit d795009 into apache:master Oct 10, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants