diff --git a/services/core/src/standby_service_impl.cpp b/services/core/src/standby_service_impl.cpp index 3f9b0eb61b7f198d3d6ba9f783b3af81dc6b6387..7d76c7d617493c267339f42f62cbf86361866ef7 100644 --- a/services/core/src/standby_service_impl.cpp +++ b/services/core/src/standby_service_impl.cpp @@ -1255,7 +1255,8 @@ void StandbyServiceImpl::DumpChangeConfigParam(const std::vector& a void StandbyServiceImpl::DumpPushStrategyChange(const std::vector& argsInStr, std::string& result) { - if (argsInStr[DUMP_SECOND_PARAM] == "--whitelist") { + auto argc = argsInStr.size(); + if (argc >= DUMP_PUSH_WHITE_LIST_PARAM_NUMS && argsInStr[DUMP_SECOND_PARAM] == "--whitelist") { StandbyStateSubscriber::GetInstance()->NotifyAllowChangedByCommonEvent( std::atoi(argsInStr[DUMP_THIRD_PARAM].c_str()), argsInStr[DUMP_FOURTH_PARAM], std::atoi(argsInStr[DUMP_FIFTH_PARAM].c_str()), argsInStr[DUMP_SIXTH_PARAM] == "true"); diff --git a/utils/common/include/common_constant.h b/utils/common/include/common_constant.h index b3cf3caf0a879a2ca76c489ed8fb395ee6fe6684..4cca9775c04f3ce224cb9e3d55a5bef017e35425 100644 --- a/utils/common/include/common_constant.h +++ b/utils/common/include/common_constant.h @@ -86,6 +86,8 @@ extern const uint32_t DUMP_SLEEP_ALLOW_LIST_NUMS; extern const uint32_t DUMP_SLEEP_APPLY_ALLOW_LIST_NUMS; extern const uint32_t DUMP_SWITCH_PARAM_NUMS; extern const uint32_t DUMP_STATE_TIMEOUT_PARAM_NUMS; +extern const uint32_t DUMP_PUSH_WHITE_LIST_PARAM_NUMS; +extern const uint32_t DUMP_PUSH_CTRL_NETWORK_PARAM_NUMS; extern const std::string DUMP_ON; extern const std::string DUMP_OFF; diff --git a/utils/common/src/common_constant.cpp b/utils/common/src/common_constant.cpp index bb9f8f913c2c202f2e613e130e49be8f728cf7de..bb8e8d7afaa102e9376bcb3e71a99e152046e8f5 100644 --- a/utils/common/src/common_constant.cpp +++ b/utils/common/src/common_constant.cpp @@ -83,6 +83,8 @@ const uint32_t DUMP_SLEEP_ALLOW_LIST_NUMS = 4; const uint32_t DUMP_SLEEP_APPLY_ALLOW_LIST_NUMS = 7; const uint32_t DUMP_SWITCH_PARAM_NUMS = 3; const uint32_t DUMP_STATE_TIMEOUT_PARAM_NUMS = 3; +const uint32_t DUMP_PUSH_WHITE_LIST_PARAM_NUMS = 6; +const uint32_t DUMP_PUSH_CTRL_NETWORK_PARAM_NUMS = 2; const std::string DUMP_ON = "on"; const std::string DUMP_OFF = "off";