Skip to content

Commit 2ab6521

Browse files
PavelVPVrlubos
authored andcommitted
[nrf fromtree] Bluetooth: Mesh: Release previously reserved slot before reserving again
If the previous upload was in-band and it didn't complete, the slot will stay reserved. By design we release slot not at the end of the upload phase, but at the start of a new upload phase. This fixes DFU/SR/FD/BV-13-C. Signed-off-by: Pavel Vasilyev <[email protected]> (cherry picked from commit d1c2ca2)
1 parent 63d1a0e commit 2ab6521

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

subsys/bluetooth/mesh/dfd_srv.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -607,6 +607,13 @@ static int handle_upload_start_oob(struct bt_mesh_model *mod, struct bt_mesh_msg
607607
return 0;
608608
}
609609

610+
/* This will be a no-op if the slot state isn't RESERVED, which is
611+
* what we want.
612+
*/
613+
if (srv->upload.slot) {
614+
bt_mesh_dfu_slot_release(srv->upload.slot);
615+
}
616+
610617
srv->upload.is_oob = true;
611618
srv->upload.slot = slot;
612619
memcpy(srv->upload.oob.uri, uri, uri_len);

0 commit comments

Comments
 (0)