diff --git a/nimble/host/include/host/ble_gatt.h b/nimble/host/include/host/ble_gatt.h index 50b3aade7..d3c1d2b40 100644 --- a/nimble/host/include/host/ble_gatt.h +++ b/nimble/host/include/host/ble_gatt.h @@ -155,8 +155,8 @@ int ble_gattc_disc_all_chrs(uint16_t conn_handle, uint16_t start_handle, int ble_gattc_disc_chrs_by_uuid(uint16_t conn_handle, uint16_t start_handle, uint16_t end_handle, const ble_uuid_t *uuid, ble_gatt_chr_fn *cb, void *cb_arg); -int ble_gattc_disc_all_dscs(uint16_t conn_handle, uint16_t chr_val_handle, - uint16_t chr_end_handle, +int ble_gattc_disc_all_dscs(uint16_t conn_handle, uint16_t start_handle, + uint16_t end_handle, ble_gatt_dsc_fn *cb, void *cb_arg); int ble_gattc_read(uint16_t conn_handle, uint16_t attr_handle, ble_gatt_attr_fn *cb, void *cb_arg); diff --git a/nimble/host/pts/pts-gatt.txt b/nimble/host/pts/pts-gatt.txt index b9916b062..d0eb0cc66 100644 --- a/nimble/host/pts/pts-gatt.txt +++ b/nimble/host/pts/pts-gatt.txt @@ -51,8 +51,8 @@ GATT/CL/GAD/BV-05-C PASS b conn peer_addr= GATT/CL/GAD/BV-06-C PASS b conn peer_addr= b disc svc conn= - b disc chr conn= start= end= - b disc dsc conn= start= end= + b disc chr conn= start= end= + b disc dsc conn= start= end= b term conn= diff --git a/nimble/host/src/ble_gattc.c b/nimble/host/src/ble_gattc.c index e448c8b96..8b12d181c 100644 --- a/nimble/host/src/ble_gattc.c +++ b/nimble/host/src/ble_gattc.c @@ -2818,8 +2818,8 @@ ble_gattc_disc_all_dscs_rx_complete(struct ble_gattc_proc *proc, int status) * @return 0 on success; nonzero on failure. */ int -ble_gattc_disc_all_dscs(uint16_t conn_handle, uint16_t chr_val_handle, - uint16_t chr_end_handle, +ble_gattc_disc_all_dscs(uint16_t conn_handle, uint16_t start_handle, + uint16_t end_handle, ble_gatt_dsc_fn *cb, void *cb_arg) { #if !MYNEWT_VAL(BLE_GATT_DISC_ALL_DSCS) @@ -2839,9 +2839,9 @@ ble_gattc_disc_all_dscs(uint16_t conn_handle, uint16_t chr_val_handle, proc->op = BLE_GATT_OP_DISC_ALL_DSCS; proc->conn_handle = conn_handle; - proc->disc_all_dscs.chr_val_handle = chr_val_handle; - proc->disc_all_dscs.prev_handle = chr_val_handle; - proc->disc_all_dscs.end_handle = chr_end_handle; + proc->disc_all_dscs.chr_val_handle = start_handle; + proc->disc_all_dscs.prev_handle = start_handle; + proc->disc_all_dscs.end_handle = end_handle; proc->disc_all_dscs.cb = cb; proc->disc_all_dscs.cb_arg = cb_arg;