summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/alpm.c
diff options
context:
space:
mode:
authorAndrew Gregory <andrew.gregory.8@gmail.com>2017-12-16 18:41:11 +0100
committerAllan McRae <allan@archlinux.org>2018-01-06 03:59:32 +0100
commit59bb21fce369e6453e00791cbb788e502e4039e9 (patch)
treecb1f006fc94e653464314dc678b0ffc6592d8dc4 /lib/libalpm/alpm.c
parentd0981d4c5b59d724d9b7989b1083c2c0e9f839b2 (diff)
downloadpacman-59bb21fce369e6453e00791cbb788e502e4039e9.tar.gz
pacman-59bb21fce369e6453e00791cbb788e502e4039e9.tar.xz
dload: ensure callback is always initialized once
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@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'lib/libalpm/alpm.c')
0 files changed, 0 insertions, 0 deletions