diff mbox series

[V2,24/36] Be sure to initialize channel_data_t by users

Message ID 20211114172733.71602-25-sbabic@denx.de
State Changes Requested
Headers show
Series DELTA Update | expand

Commit Message

Stefano Babic Nov. 14, 2021, 5:27 p.m. UTC
Initialize new introduced field in the structure in any use case
(downloader, Hawkbit, general server).

Signed-off-by: Stefano Babic <sbabic@denx.de>
---
 corelib/downloader.c       |  5 ++++-
 suricatta/server_general.c |  3 +++
 suricatta/server_hawkbit.c | 11 +++++++----
 3 files changed, 14 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/corelib/downloader.c b/corelib/downloader.c
index 8596694..9eec3f1 100644
--- a/corelib/downloader.c
+++ b/corelib/downloader.c
@@ -106,7 +106,10 @@  static channel_data_t channel_options = {
 	.retries = DL_DEFAULT_RETRIES,
 	.low_speed_timeout = DL_LOWSPEED_TIME,
 	.headers_to_send = NULL,
-	.max_download_speed = 0 // Unlimited download speed is default.
+	.max_download_speed = 0, /* Unlimited download speed is default. */
+	.noipc = false,
+	.range = NULL,
+	.headers = NULL,
 };
 
 int start_download(const char *fname, int argc, char *argv[])
diff --git a/suricatta/server_general.c b/suricatta/server_general.c
index 7da3c84..056e9ec 100644
--- a/suricatta/server_general.c
+++ b/suricatta/server_general.c
@@ -109,7 +109,10 @@  static channel_data_t channel_data_defaults = {.debug = false,
 #ifdef CONFIG_SURICATTA_SSL
 					       .usessl = true,
 #endif
+					       .noipc = false,
+					       .headers = NULL,
 					       .format = CHANNEL_PARSE_NONE,
+					       .range = NULL,
 					       .nocheckanswer = true,
 					       .nofollow = true,
 					       .strictssl = true};
diff --git a/suricatta/server_hawkbit.c b/suricatta/server_hawkbit.c
index aa4d9a4..3fc60e3 100644
--- a/suricatta/server_hawkbit.c
+++ b/suricatta/server_hawkbit.c
@@ -135,10 +135,13 @@  static channel_data_t channel_data_defaults = {.debug = false,
 					       .nocheckanswer = false,
 					       .nofollow = false,
 					       .strictssl = true,
-						   .connection_timeout = 0,
-						   .headers_to_send = NULL,
-						   .received_headers = NULL,
-						   .max_download_speed = 0 // No download speed limit is default.
+					       .max_download_speed = 0, // No download speed limit is default.
+					       .noipc = false,
+					       .range = NULL,
+					       .connection_timeout = 0,
+					       .headers = NULL,
+					       .headers_to_send = NULL,
+					       .received_headers = NULL
 						};
 
 static struct timeval server_time;