diff --git a/services/param/watcher/proxy/watcher_manager.cpp b/services/param/watcher/proxy/watcher_manager.cpp index ddc7b5394ca34f40a316a81d5db788141c4321c3..7f615d7b8f37818dd4edc2b942e026bd54e00347 100755 --- a/services/param/watcher/proxy/watcher_manager.cpp +++ b/services/param/watcher/proxy/watcher_manager.cpp @@ -29,7 +29,6 @@ namespace init_param { REGISTER_SYSTEM_ABILITY_BY_ID(WatcherManager, PARAM_WATCHER_DISTRIBUTED_SERVICE_ID, true) const static int32_t INVALID_SOCKET = -1; -const static int32_t RECV_BUFFER_MAX = 5 * 1024; const static int32_t SLEEP_TIME = 2000; uint32_t WatcherManager::AddWatcher(const std::string &keyPrefix, const sptr &watcher) { @@ -211,6 +210,7 @@ void WatcherManager::SendLocalChange(const std::string &keyPrefix, ParamWatcherP void WatcherManager::RunLoop() { + const int32_t RECV_BUFFER_MAX = 5 * 1024; char *buffer = (char *)malloc(RECV_BUFFER_MAX); PARAM_CHECK(buffer != NULL, return, "Failed to create buffer for recv"); while (!stop) { diff --git a/services/param/watcher/proxy/watcher_manager.h b/services/param/watcher/proxy/watcher_manager.h index 5845528ecb32282096082da39f89b467a84f318e..079d52bdcb065c6f27a59c234de4bbc3844de105 100755 --- a/services/param/watcher/proxy/watcher_manager.h +++ b/services/param/watcher/proxy/watcher_manager.h @@ -73,7 +73,8 @@ public: { return keyPrefix_; } - bool Emptry() { + bool Emptry() + { return watchers_.size() == 0; } uint32_t GetGroupId()