Skip to content

Conversation

@liuX10
Copy link
Contributor

@liuX10 liuX10 commented Feb 10, 2026

No description provided.

…ts limit

bug: v/84473

When the number of registered services exceeds the limit, records not captured by `gatt_sdp_records` will be returned. Subsequent attempts to locate pointer indices for release will fail.

Signed-off-by: liuxiang18 <liuxiang18@xiaomi.com>
…`bt_conn_lookup_addr_br`.

bug: v/84474

1. Add a call to bt_conn_unref(conn)
2. Use the locally stored conn in the sal layer to avoid executing `bt_conn_unref`

Signed-off-by: liuxiang18 <liuxiang18@xiaomi.com>
bug: v/84474

When the peer initiates a connection, the connection callback reporting logic lacks the `bt_conn_add` entry. This prevents the subsequent SAL layer from retrieving the corresponding `bt_conn_info_t` object for the address, leading to subsequent data transmission process failures.

Signed-off-by: liuxiang18 <liuxiang18@xiaomi.com>
bug: v/84474

When the SAL layer does not store the BREDR connection information, it returns info as NULL. At this point, attempting an erroneous address offset on info->conn will result in a null pointer return.

Signed-off-by: liuxiang18 <liuxiang18@xiaomi.com>
Copy link
Contributor

@zhongzhijie1 zhongzhijie1 left a comment

Choose a reason for hiding this comment

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

LGTM. The changes look good and address several issues:

  1. Memory Management: Fixed potential memory leaks in gatt_sdp_create_record (freeing attrs and record on failure) and do_gatts_disconnect (adding bt_conn_unref).
  2. Connection Tracking: zblue_gatts_connected_callback now uses bt_conn_add to ensure the connection is tracked and sets the GATT_ROLE_SERVER flag.
  3. ATT over BR/EDR Support: The changes in send_response, send_notification, and send_indication correctly implement a fallback to look up BR/EDR connections when an LE connection is not found, which is consistent with the PR title.

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.

4 participants