wget-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Wget-dev] wget2 | Fix progress display (issue #339) (!391)


From: Josef Möllers
Subject: Re: [Wget-dev] wget2 | Fix progress display (issue #339) (!391)
Date: Fri, 17 Aug 2018 08:52:36 +0000

Josef Möllers commented on a discussion on libwget/bar.c:

>  void wget_bar_slot_downloaded(wget_bar_t *bar, int slot, size_t nbytes)
>  {
>       wget_thread_mutex_lock(bar->mutex);
> -     bar->slots[slot].bytes_downloaded = nbytes;
> +     bar->slots[slot].bytes_downloaded += nbytes;

"nbytes" is the number of bytes in the current chunk which is written into the 
destination file in _get_body() a few lines above:
                size_t written = safe_write(ctx->outfd, data, length);
:
                bar_set_downloaded(ctx->progress_slot, length);
resp->cur_downloaded is the cumulative amount you refer to.

-- 
Reply to this email directly or view it on GitLab: 
https://gitlab.com/gnuwget/wget2/merge_requests/391#note_95083222
You're receiving this email because of your account on gitlab.com.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]