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 <pavel.vasilyev@nordicsemi.no>
This commit is contained in:
parent
7154f356af
commit
d1c2ca2525
1 changed files with 7 additions and 0 deletions
|
@ -607,6 +607,13 @@ static int handle_upload_start_oob(struct bt_mesh_model *mod, struct bt_mesh_msg
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* This will be a no-op if the slot state isn't RESERVED, which is
|
||||
* what we want.
|
||||
*/
|
||||
if (srv->upload.slot) {
|
||||
bt_mesh_dfu_slot_release(srv->upload.slot);
|
||||
}
|
||||
|
||||
srv->upload.is_oob = true;
|
||||
srv->upload.slot = slot;
|
||||
memcpy(srv->upload.oob.uri, uri, uri_len);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue