-
Notifications
You must be signed in to change notification settings - Fork 1
RDKB-60656 : Available memory check for firmware downloads #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,5 +1,5 @@ | ||||||||||||||||||||
| /* | ||||||||||||||||||||
| * If not stated otherwise in this file or this component's Licenses.txt file the | ||||||||||||||||||||
|
Check failure on line 2 in source/cm_http_dl.c
|
||||||||||||||||||||
| * following copyright and licenses apply: | ||||||||||||||||||||
| * | ||||||||||||||||||||
| * Copyright 2017 RDK Management | ||||||||||||||||||||
|
|
@@ -21,6 +21,7 @@ | |||||||||||||||||||
| #include <string.h> | ||||||||||||||||||||
|
|
||||||||||||||||||||
| #include <telemetry_busmessage_sender.h> | ||||||||||||||||||||
| #include "fw_download_check.h" | ||||||||||||||||||||
| #include <syscfg/syscfg.h> | ||||||||||||||||||||
|
Comment on lines
23
to
25
|
||||||||||||||||||||
|
|
||||||||||||||||||||
| #include "cm_hal.h" | ||||||||||||||||||||
|
|
@@ -636,8 +637,12 @@ | |||||||||||||||||||
| } | ||||||||||||||||||||
| else if (type == HTTP_DOWNLOAD) | ||||||||||||||||||||
| { | ||||||||||||||||||||
| http_status = HTTP_Download(); | ||||||||||||||||||||
|
|
||||||||||||||||||||
| if(can_proceed_fw_download() == FW_DWNLD_MEMCHK_NOT_ENOUGH_MEM){ | ||||||||||||||||||||
| printf("Available memory is not enough to proceed with firmware download\n"); | ||||||||||||||||||||
|
Comment on lines
+640
to
+641
|
||||||||||||||||||||
| }else{ | ||||||||||||||||||||
| http_status = HTTP_Download(); | ||||||||||||||||||||
| } | ||||||||||||||||||||
|
|
||||||||||||||||||||
|
Comment on lines
+642
to
+645
|
||||||||||||||||||||
| }else{ | |
| http_status = HTTP_Download(); | |
| } | |
| /* Treat insufficient memory as a failed download */ | |
| http_status = 0; | |
| }else{ | |
| http_status = HTTP_Download(); | |
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Linking against
-lfw_download_chkadds a new library dependency, butconfigure.ac/native-build dependency config doesn’t appear to check for or build/install this library. This can cause link failures in CI or for developers without that library preinstalled; add a configure-time check (or ensure the native-build dependency scripts install it) so the build fails clearly when missing.