Skip to content

Commit

Permalink
dfu: dfu_target: Do not clear configured flag
Browse files Browse the repository at this point in the history
Do not clear configured flag on dfu_target_full_modem_reset().

Signed-off-by: Eivind Jølsgard <eivind.jolsgard@nordicsemi.no>
  • Loading branch information
eivindj-nordic committed Jan 4, 2024
1 parent e6b0060 commit 103c5f0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
15 changes: 7 additions & 8 deletions samples/cellular/http_update/modem_full_update/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -420,13 +420,6 @@ static int update_download(void)
{
int err;
const char *file;

err = fota_download_init(fota_dl_handler);
if (err != 0) {
printk("fota_download_init() failed, err %d\n", err);
return err;
}

const struct dfu_target_full_modem_params params = {
.buf = fmfu_buf,
.len = sizeof(fmfu_buf),
Expand All @@ -437,8 +430,14 @@ static int update_download(void)
}
};

err = dfu_target_full_modem_cfg(&params);
err = fota_download_init(fota_dl_handler);
if (err != 0) {
printk("fota_download_init() failed, err %d\n", err);
return err;
}

err = dfu_target_full_modem_cfg(&params);
if (err != 0 && err != -EALREADY) {
printk("dfu_target_full_modem_cfg failed: %d\n", err);
return err;
}
Expand Down
2 changes: 0 additions & 2 deletions subsys/dfu/dfu_target/src/dfu_target_full_modem.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,5 @@ int dfu_target_full_modem_reset(void)
return -EPERM;
}

configured = false;

return dfu_target_stream_reset();
}

0 comments on commit 103c5f0

Please sign in to comment.