Bluetooth: Mesh: Use dfd_phase_set() in dfu_suspended()

Currently, dfu_suspended() sets the phase SUSPENDED
directly in the structure, bypassing the dfd_phase_set() function.
This prevents the phase change callback in the bt_mesh_dfd_srv_cb
structure from receiving the SUSPENDED event.

Signed-off-by: Emilio Aguila Escalante <emilio.aguila@hotmail.com>
This commit is contained in:
Emilio Aguila Escalante 2024-09-17 22:19:45 -06:00 committed by Henrik Brix Andersen
commit dda9ba6031

View file

@ -801,7 +801,7 @@ static void dfu_suspended(struct bt_mesh_dfu_cli *cli)
struct bt_mesh_dfd_srv *srv =
CONTAINER_OF(cli, struct bt_mesh_dfd_srv, dfu);
srv->phase = BT_MESH_DFD_PHASE_TRANSFER_SUSPENDED;
dfd_phase_set(srv, BT_MESH_DFD_PHASE_TRANSFER_SUSPENDED);
}
static void dfu_ended(struct bt_mesh_dfu_cli *cli,