Skip to content

Commit

Permalink
subdevice FOTA - improve error logging
Browse files Browse the repository at this point in the history
State explicitly to which filename we are trying to write.
  • Loading branch information
JanneKiiskila committed Sep 26, 2024
1 parent 4dcefb9 commit e21858d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion edge-client/subdevice_fota.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
* ----------------------------------------------------------------------------
* Copyright 2021 Pelion Ltd.
* Copyright 2022-2024 Izuma Networks
*
* SPDX-License-Identifier: Apache-2.0
*
Expand Down Expand Up @@ -236,6 +237,7 @@ int start_download(char* downloaded_path) {
char filename[FILENAME_MAX] = "";
sprintf(filename,"%s/%s-%" PRIu64 ".bin",SUBDEVICE_FIRMWARE_DOWNLOAD_LOCATION,fota_ctx->fw_info->component_name, fota_ctx->fw_info->version);
tr_info("File location: %s", filename);
tr_info("File URL : %s", fota_ctx->fw_info->uri);
fota_ctx->state = FOTA_STATE_DOWNLOADING;
CURL *curl_handle;
FILE *fwfile;
Expand All @@ -261,7 +263,7 @@ int start_download(char* downloaded_path) {
}
}
else {
tr_error("can not open file, aborting");
tr_error("can not open file %s, aborting", filename);
subdevice_abort_update(FOTA_STATUS_STORAGE_WRITE_FAILED,"Can not open file, aborting the update!");
curl_easy_cleanup(curl_handle);
curl_global_cleanup();
Expand Down

0 comments on commit e21858d

Please sign in to comment.