Skip to content

Commit fc94c51

Browse files
Force status refresh on target and action request (#132)
1 parent f2b5b60 commit fc94c51

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

lib/wpc_proto/internal_modules/proto_config.c

+4-6
Original file line numberDiff line numberDiff line change
@@ -982,8 +982,6 @@ app_proto_res_e Proto_config_handle_set_scratchpad_target_and_action_request(
982982

983983
case wp_ScratchpadAction_NO_OTAP :
984984
res = WPC_write_target_scratchpad(0, 0, 0, 0);
985-
// Read otap variable back to be sure everything is updated
986-
initialize_otap_variables();
987985
break;
988986

989987
case wp_ScratchpadAction_PROPAGATE_AND_PROCESS_WITH_DELAY :
@@ -1056,10 +1054,6 @@ app_proto_res_e Proto_config_handle_set_scratchpad_target_and_action_request(
10561054
crc,
10571055
req->target_and_action.action - wp_ScratchpadAction_NO_OTAP,
10581056
param);
1059-
1060-
// Read otap variable back to be sure everything is updated
1061-
initialize_otap_variables();
1062-
10631057
break;
10641058

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

1068+
// Force otap variable read back to be sure everything is in sync
1069+
// And generate event status
1070+
Proto_config_refresh_otap_infos();
1071+
10741072
Common_Fill_response_header(&resp->header,
10751073
req->header.req_id,
10761074
Common_convert_error_code(res));

0 commit comments

Comments
 (0)