Skip to content

Commit

Permalink
log: fix missing string error on sid_init in cli
Browse files Browse the repository at this point in the history
one of the errors were not converted to string form in logs

Signed-off-by: Robert Gałat <[email protected]>
  • Loading branch information
RobertGalatNordic committed Aug 28, 2024
1 parent 4cf0dae commit 5fcb94a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion samples/sid_end_device/src/cli/app_dut.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ void dut_event_init(sidewalk_ctx_t *sid, void *ctx)
return;
}
sid_error_t e = sid_init(&sid->config, &sid->handle);
LOG_INF("sid_init returned %d", e);
LOG_INF("sid_init returned %d (%s)", e, SID_ERROR_T_STR(e));
if (e != SID_ERROR_NONE) {
return;
}
Expand Down
9 changes: 8 additions & 1 deletion samples/sid_end_device/src/cli/sbdt_shell_events.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ void sbdt_event_print_params(sidewalk_ctx_t *sid, void *ctx)
struct sid_bulk_data_transfer_params params = {};
sid_error_t ret = sid_bulk_data_transfer_get_transfer_params(sid->handle, file_id, &params);
if (ret != SID_ERROR_NONE) {
// CMD_PRINT_RESULT(ret);
LOG_ERR("sid_bulk_data_transfer_get_transfer_params returned %d, (%s)", ret,
SID_ERROR_T_STR(ret));
return;
Expand Down Expand Up @@ -111,6 +110,10 @@ void sbdt_event_finalize_request_response(sidewalk_ctx_t *sid, void *ctx)
struct sbdt_finalize_resp_ctx *resp_event = (struct sbdt_finalize_resp_ctx *)ctx;
sid_error_t result = sid_bulk_data_transfer_finalize(sid->handle, resp_event->file_id,
resp_event->finalize_response_action);
if (result != SID_ERROR_NONE) {
LOG_ERR("sid_bulk_data_transfer_finalize returned %d, (%s)", result,
SID_ERROR_T_STR(result));
}
LOG_INF("CMD: FINALIZE RESP: ERR: %d", result);
}

Expand All @@ -119,5 +122,9 @@ void sbdt_event_release_buffer(sidewalk_ctx_t *sid, void *ctx)
struct sbdt_buffer_release_ctx *release_event = ctx;
sid_error_t result = sid_bulk_data_transfer_release_buffer(
sid->handle, release_event->file_id, &release_event->transfer_buffer);
if (result != SID_ERROR_NONE) {
LOG_ERR("sid_bulk_data_transfer_release_buffer returned %d, (%s)", result,
SID_ERROR_T_STR(result));
}
LOG_INF("CMD: RELEASE BUFFER: ERR: %d", result);
}

0 comments on commit 5fcb94a

Please sign in to comment.