[pacman-dev] [PATCH] dload: ensure callback is always initialized once

Allan McRae allan at archlinux.org
Sat Jan 6 02:59:21 UTC 2018


On 17/12/17 03:41, Andrew Gregory wrote:
> Frontends rely on an initialization call for setup between downloads.
> Checking for intialization after checking for a completed download can
> skip initialization in cases where files are small enough to be
> downloaded all at once (FS#56408).  Relying on previous download size
> can result in multiple initializations if there are multiple
> non-transfer events prior to the download starting (fS#56468).
> 
> Introduce a new cb_initialized variable to the payload struct and use it
> to ensure that the callback is initialized exactly once prior to any
> actual events.
> 
> Fixes FS#56408, FS#56468
> 
> Signed-off-by: Andrew Gregory <andrew.gregory.8 at gmail.com>

Great!  Probably fixes a much older version of FS#56468 too (I think we
blamed that on ftp...).

A


More information about the pacman-dev mailing list