From 45a86e5f0618358a8ca98a0e96f67f824fe9d1ce Mon Sep 17 00:00:00 2001 From: hemenghao Date: Wed, 13 Aug 2025 14:22:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=91=8A=E8=AD=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: hemenghao --- services/include/peruser_session.h | 2 +- services/src/peruser_session.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/services/include/peruser_session.h b/services/include/peruser_session.h index 0ec863864..3f45e6c64 100644 --- a/services/include/peruser_session.h +++ b/services/include/peruser_session.h @@ -291,7 +291,7 @@ private: void SetImeConnection(const sptr &connection); sptr GetImeConnection(); void ClearImeConnection(const sptr &connection); - int32_t IsRequestOverLimit(TimeLimitType timeLimit, int32_t resetTimeOut, int32_t restartNum); + int32_t IsRequestOverLimit(TimeLimitType timeLimit, int32_t resetTimeOut, uint32_t restartNum); int32_t PrepareImeInfos(ImeType type, std::vector> &agents, std::vector &imeInfos); diff --git a/services/src/peruser_session.cpp b/services/src/peruser_session.cpp index fa4701298..bd9f8a086 100644 --- a/services/src/peruser_session.cpp +++ b/services/src/peruser_session.cpp @@ -60,7 +60,7 @@ constexpr const char *STRICT_MODE = "strictMode"; constexpr const char *ISOLATED_SANDBOX = "isolatedSandbox"; constexpr uint32_t CHECK_IME_RUNNING_RETRY_INTERVAL = 60; constexpr uint32_t CHECK_IME_RUNNING_RETRY_TIMES = 10; -constexpr int32_t MAX_RESTART_NUM = 3; +constexpr uint32_t MAX_RESTART_NUM = 3; constexpr int32_t IME_RESET_TIME_OUT = 3; constexpr int32_t MAX_RESTART_TASKS = 2; constexpr uint32_t MAX_ATTACH_COUNT = 100000; @@ -68,7 +68,7 @@ constexpr const char *UNDEFINED = "undefined"; constexpr int32_t WAIT_ATTACH_FINISH_DELAY = 50; constexpr int32_t WAIT_ATTACH_FINISH_MAX_TIMES = 20; constexpr uint32_t MAX_SCB_START_COUNT = 2; -constexpr uint32_t PROXY_REGISTERATION_TIME_INTERVAL = 1; // 1s +constexpr int32_t PROXY_REGISTERATION_TIME_INTERVAL = 1; // 1s constexpr uint32_t MAX_REGISTRATIONS_NUM = 3; PerUserSession::PerUserSession(int userId) : userId_(userId) { } @@ -2809,7 +2809,7 @@ void PerUserSession::ClearImeConnection(const sptr &c connection_ = nullptr; } -int32_t PerUserSession::IsRequestOverLimit(TimeLimitType timeLimitType, int32_t resetTimeOut, int32_t restartNum) +int32_t PerUserSession::IsRequestOverLimit(TimeLimitType timeLimitType, int32_t resetTimeOut, uint32_t restartNum) { std::lock_guard lock(resetLock); auto now = time(nullptr); -- Gitee