aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/artifactory.c3
-rw-r--r--src/deliverable.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/artifactory.c b/src/artifactory.c
index 8cc0db5..437912d 100644
--- a/src/artifactory.c
+++ b/src/artifactory.c
@@ -59,7 +59,8 @@ int artifactory_download_cli(char *dest,
}
sprintf(path + strlen(path), "/%s", remote_filename);
- if (HTTP_ERROR(download(url, path, NULL))) {
+ long fetch_status = download(url, path, NULL);
+ if (HTTP_ERROR(fetch_status) || fetch_status < 0) {
fprintf(stderr, "%s: download failed: %s\n", __FUNCTION__, url);
return -1;
}
diff --git a/src/deliverable.c b/src/deliverable.c
index 3b004cd..1640054 100644
--- a/src/deliverable.c
+++ b/src/deliverable.c
@@ -1180,7 +1180,8 @@ int delivery_get_installer(struct Delivery *ctx, char *installer_url) {
sprintf(script_path, "%s/%s", ctx->storage.tmpdir, installer);
if (access(script_path, F_OK)) {
// Script doesn't exist
- if (HTTP_ERROR(download(installer_url, script_path, NULL))) {
+ int fetch_status = download(installer_url, script_path, NULL);
+ if (HTTP_ERROR(fetch_status) || fetch_status < 0) {
// download failed
return -1;
}