The debuginfod client cache uses empty files to indicate that a download
was unsuccessful and should not be attempted again.
Commit
5527216460c61 skips the creation of empty files when a downloaded
is cancelled by the user. This works by setting
client->progressfn_cancel to true when progressfn returns a non-zero value.
Commit
d47d93b1049ec appears to have accidentally removed this setting of
client->progressfn_cancel.
Restore setting client->progressfn_cancel to true when progressfn
returns a non-zero value. Also set client->progressfn_cancel to false
at the beginning of debuginfod_find_metadata to avoid previous
cancellations affecting the current metadata query.
Signed-off-by: Aaron Merey <amerey@redhat.com>
}
if ((*c->progressfn) (c, pa, dl_size == -1 ? 0 : dl_size))
- break;
+ {
+ c->progressfn_cancel = true;
+ break;
+ }
}
}
/* Check to see if we are downloading something which exceeds maxsize, if set.*/
int rc = 0, r;
int vfd = client->verbose_fd;
struct handle_data *data = NULL;
+
+ client->progressfn_cancel = false;
json_object *json_metadata = json_object_new_object();
json_bool json_metadata_complete = true;