@@ -89,11 +89,15 @@ static void send_progress_msg(void)
static void _swupdate_download_update(unsigned int perc, unsigned long long totalbytes)
{
+ /*
+ * TODO: totalbytes should be forwarded correctly
+ * after adding it to the progress message
+ */
struct swupdate_progress *pprog = &progress;
pthread_mutex_lock(&pprog->lock);
if (perc != pprog->msg.dwl_percent) {
pprog->msg.dwl_percent = perc;
- pprog->msg.dwl_bytes = totalbytes;
+ totalbytes = totalbytes;
send_progress_msg();
}
pthread_mutex_unlock(&pprog->lock);
@@ -136,7 +140,6 @@ void swupdate_download_update(unsigned int perc, unsigned long long totalbytes)
if (pid == getpid()) {
struct progress_dwl_data *pdwl = (struct progress_dwl_data *)info;
pdwl->dwl_percent = perc;
- pdwl->dwl_bytes = totalbytes;
notify(PROGRESS, RECOVERY_DWL, TRACELEVEL, info);
return;
}
@@ -27,7 +27,6 @@ struct progress_msg {
unsigned int magic; /* Magic Number */
RECOVERY_STATUS status; /* Update Status (Running, Failure) */
unsigned int dwl_percent; /* % downloaded data */
- unsigned long long dwl_bytes; /* total of bytes to be downloaded */
unsigned int nsteps; /* No. total of steps */
unsigned int cur_step; /* Current step index */
unsigned int cur_percent; /* % in current step */
Commit 029738e introduces a change of API adding the total number of bytes to be downloaded. This breaks current API and it is temporary remove with this patch until a suitable way to forward API changes will be implemented. Signed-off-by: Stefano Babic <sbabic@denx.de> --- core/progress_thread.c | 7 +++++-- include/progress_ipc.h | 1 - 2 files changed, 5 insertions(+), 3 deletions(-)