img_mgmt: fix callback parameter values

Start, ongoing and complete states are now used in the callback

Signed-off-by: Jamie McCrae <jamie.mccrae@lairdconnect.com>
This commit is contained in:
Jamie McCrae 2021-09-09 11:35:15 +01:00 committed by Dominik Ermel
parent 31a2aa9cea
commit 13630cf6c5
1 changed files with 3 additions and 1 deletions

View File

@ -515,6 +515,8 @@ img_mgmt_upload(struct mgmt_ctxt *ctxt)
}
}
#endif
} else {
cmd_status_arg.status = IMG_MGMT_ID_UPLOAD_STATUS_ONGOING;
}
/* Write the image data to flash. */
@ -542,7 +544,7 @@ img_mgmt_upload(struct mgmt_ctxt *ctxt)
if (g_img_mgmt_state.off == g_img_mgmt_state.size) {
/* Done */
img_mgmt_dfu_pending();
cmd_status_arg.status = IMG_MGMT_ID_UPLOAD_STATUS_ONGOING;
cmd_status_arg.status = IMG_MGMT_ID_UPLOAD_STATUS_COMPLETE;
g_img_mgmt_state.area_id = -1;
}
}