Skip to content
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

[Backport v2.7-branch] mgmt: hawkbit: remove hb_context.status_buffer_size #70647

Merged
merged 1 commit into from
Mar 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions subsys/mgmt/hawkbit/hawkbit.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ static struct hawkbit_context {
uint8_t *response_data;
int32_t json_action_id;
size_t url_buffer_size;
size_t status_buffer_size;
struct hawkbit_download dl;
struct http_request http_req;
struct flash_img_context flash_ctx;
Expand Down Expand Up @@ -903,7 +902,7 @@ static bool send_request(enum http_method method,
ret = json_obj_encode_buf(json_cfg_descr,
ARRAY_SIZE(json_cfg_descr), &cfg,
hb_context.status_buffer,
hb_context.status_buffer_size - 1);
sizeof(hb_context.status_buffer));
if (ret) {
LOG_ERR("Can't encode the JSON script (HAWKBIT_CONFIG_DEVICE): %d", ret);
return false;
Expand Down Expand Up @@ -938,7 +937,7 @@ static bool send_request(enum http_method method,
ret = json_obj_encode_buf(json_close_descr,
ARRAY_SIZE(json_close_descr), &close,
hb_context.status_buffer,
hb_context.status_buffer_size - 1);
sizeof(hb_context.status_buffer));
if (ret) {
LOG_ERR("Can't encode the JSON script (HAWKBIT_CLOSE): %d", ret);
return false;
Expand Down Expand Up @@ -989,7 +988,7 @@ static bool send_request(enum http_method method,
ret = json_obj_encode_buf(json_dep_fbk_descr,
ARRAY_SIZE(json_dep_fbk_descr),
&feedback, hb_context.status_buffer,
hb_context.status_buffer_size - 1);
sizeof(hb_context.status_buffer));
if (ret) {
LOG_ERR("Can't encode the JSON script (HAWKBIT_REPORT): %d", ret);
return ret;
Expand Down
Loading