This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git

commit fcc541c4214254445cf3e08af7b008f106bcb24c
Author: Szymon Czapracki <[email protected]>
AuthorDate: Thu May 22 10:59:37 2025 +0200

    apps/bttester: Assign address field in sync established event
    
    Peer address field in sync established event wast not set.
---
 apps/bttester/src/btp_gap.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/apps/bttester/src/btp_gap.c b/apps/bttester/src/btp_gap.c
index 040bcd58e..ef87b0154 100644
--- a/apps/bttester/src/btp_gap.c
+++ b/apps/bttester/src/btp_gap.c
@@ -1202,11 +1202,18 @@ bond_lost(uint16_t conn_handle)
 static void
 sync_established(struct ble_gap_event *event)
 {
+    int rc;
+    struct ble_gap_conn_desc desc;
     struct gap_periodic_sync_est_ev ev;
 
     ev.status = event->periodic_sync.status;
     ev.sync_handle = event->periodic_sync.sync_handle;
 
+    rc = ble_gap_conn_find(ev.sync_handle, &desc);
+    assert(rc == 0);
+
+    ev.peer_addr = desc.peer_id_addr;
+
     tester_event(BTP_SERVICE_ID_GAP, GAP_EV_PERIODIC_SYNC_ESTABLISHED,
                  (uint8_t *) &ev, sizeof(ev));
 }

Reply via email to