Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm
diff options
context:
space:
mode:
authormorganamilo <morganamilo@archlinux.org>2020-11-24 12:39:05 +0000
committerAllan McRae <allan@archlinux.org>2020-11-26 16:31:27 +1000
commit4b8c274f7fc1ecd8cee9176471f081da3323b258 (patch)
tree90b733a677c5e53fb88a12e587a16bfbf3db325b /lib/libalpm
parent9dc29ebf5f3c6fe34b5a1b60f6f57f88668d9d20 (diff)
libalpm: don't call dlcb when not set
Fixes FS#68728: Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/dload.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libalpm/dload.c b/lib/libalpm/dload.c
index 673e769f..d43e6d45 100644
--- a/lib/libalpm/dload.c
+++ b/lib/libalpm/dload.c
@@ -586,7 +586,7 @@ cleanup:
unlink(payload->tempfile_name);
}
- if(!payload->signature) {
+ if(handle->dlcb && !payload->signature) {
alpm_download_event_completed_t cb_data = {0};
cb_data.total = bytes_dl;
cb_data.result = ret;
@@ -719,7 +719,7 @@ static int curl_download_internal(alpm_handle_t *handle,
struct dload_payload *payload = payloads->data;
if(curl_add_payload(handle, curlm, payload, localpath) == 0) {
- if(!payload->signature) {
+ if(handle->dlcb && !payload->signature) {
alpm_download_event_init_t cb_data = {.optional = payload->errors_ok};
handle->dlcb(payload->remote_name, ALPM_DOWNLOAD_INIT, &cb_data);
}