Skip to content

Commit

Permalink
Force status refresh on target and action request
Browse files Browse the repository at this point in the history
  • Loading branch information
StephaneTriomphe committed Feb 3, 2025
1 parent f2b5b60 commit efe48be
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions lib/wpc_proto/internal_modules/proto_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -982,8 +982,6 @@ app_proto_res_e Proto_config_handle_set_scratchpad_target_and_action_request(

case wp_ScratchpadAction_NO_OTAP :
res = WPC_write_target_scratchpad(0, 0, 0, 0);
// Read otap variable back to be sure everything is updated
initialize_otap_variables();
break;

case wp_ScratchpadAction_PROPAGATE_AND_PROCESS_WITH_DELAY :
Expand Down Expand Up @@ -1056,10 +1054,6 @@ app_proto_res_e Proto_config_handle_set_scratchpad_target_and_action_request(
crc,
req->target_and_action.action - wp_ScratchpadAction_NO_OTAP,
param);

// Read otap variable back to be sure everything is updated
initialize_otap_variables();

break;

default:
Expand All @@ -1071,6 +1065,10 @@ app_proto_res_e Proto_config_handle_set_scratchpad_target_and_action_request(
LOGE("Target and action failed %d\n", res);
}

// Force otap variable read back to be sure everything is in sync
// And generate event status
Proto_config_refresh_otap_infos();

Common_Fill_response_header(&resp->header,
req->header.req_id,
Common_convert_error_code(res));
Expand Down

0 comments on commit efe48be

Please sign in to comment.