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

Force status refresh on target and action request #132

Merged
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
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