Bluetooth: Audio: MCC memset discover params for included

The discovery parameters may contain values from previous
discovery calls. The simply and future proof solution to
this is to simply memset it before using it.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This commit is contained in:
Emil Gydesen 2023-03-15 13:41:25 +01:00 committed by Carles Cufí
commit 9c129c5bc7

View file

@ -1296,6 +1296,8 @@ static void discover_included(struct mcs_instance_t *mcs_inst, struct bt_conn *c
{ {
int err; int err;
memset(&mcs_inst->discover_params, 0, sizeof(mcs_inst->discover_params));
mcs_inst->discover_params.start_handle = mcs_inst->start_handle; mcs_inst->discover_params.start_handle = mcs_inst->start_handle;
mcs_inst->discover_params.end_handle = mcs_inst->end_handle; mcs_inst->discover_params.end_handle = mcs_inst->end_handle;
mcs_inst->discover_params.type = BT_GATT_DISCOVER_INCLUDE; mcs_inst->discover_params.type = BT_GATT_DISCOVER_INCLUDE;