fix(nimble): Added parameter in peer_init for included service allocation

This commit is contained in:
Astha Verma
2025-06-27 12:30:30 +05:30
committed by Rahul Tank
parent c52e8ee1f5
commit af628e5ccb
16 changed files with 886 additions and 20 deletions
@@ -602,13 +602,16 @@ peer_disc_incs(struct peer *peer)
}
}
}
svc = peer->cur_svc;
rc = ble_gattc_find_inc_svcs(peer->conn_handle,
svc->svc.start_handle,
svc->svc.end_handle,
peer_inc_disced, peer);
if (rc != 0) {
if (svc != NULL && !peer_svc_is_empty(svc)) {
rc = ble_gattc_find_inc_svcs(peer->conn_handle,
svc->svc.start_handle,
svc->svc.end_handle,
peer_inc_disced, peer);
if (rc != 0) {
peer_disc_chrs(peer);
}
} else {
peer_disc_chrs(peer);
}
}