Skip to content

Commit bbda3cf

Browse files
committed
fix
1 parent 61543b2 commit bbda3cf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/nimble/nimble/host/src/ble_gatts.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2772,7 +2772,8 @@ ble_gatts_find_dsc(const ble_uuid_t *svc_uuid, const ble_uuid_t *chr_uuid,
27722772
return BLE_HS_ENOENT;
27732773
}
27742774

2775-
if (ble_uuid_cmp(cur->ha_uuid, dsc_uuid) == 0 && (dsc_arg == NULL || (dsc_arg != NULL && cur->ha_cb_arg == dsc_arg))) {
2775+
if (ble_uuid_cmp(cur->ha_uuid, dsc_uuid) == 0 && (dsc_arg == NULL ||
2776+
(dsc_arg && cur->ha_cb_arg && ((struct ble_gatt_dsc_def*)cur->ha_cb_arg)->arg == dsc_arg))) {
27762777
if (out_handle != NULL) {
27772778
*out_handle = cur->ha_handle_id;
27782779
return 0;

0 commit comments

Comments
 (0)