mirror of
https://gitee.com/openharmony/security_security_guard
synced 2024-11-23 06:30:17 +00:00
commit
d1bf9c313d
@ -35,7 +35,7 @@ public:
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
static bool UpdataConfig()
|
||||
static bool UpdateConfig()
|
||||
{
|
||||
T config;
|
||||
auto cfgOperator = std::make_unique<ConfigOperator>(config);
|
||||
|
@ -37,9 +37,9 @@ bool ConfigSubscriber::UpdateConfig(const std::string &file)
|
||||
ConfigUpdateEvent event{};
|
||||
bool isSuccess = false;
|
||||
if (file == CONFIG_CACHE_FILES[EVENT_CFG_INDEX]) {
|
||||
isSuccess = ConfigManager::UpdataConfig<EventConfig>();
|
||||
isSuccess = ConfigManager::UpdateConfig<EventConfig>();
|
||||
} else if (file == CONFIG_CACHE_FILES[MODEL_CFG_INDEX]) {
|
||||
isSuccess = ConfigManager::UpdataConfig<ModelConfig>();
|
||||
isSuccess = ConfigManager::UpdateConfig<ModelConfig>();
|
||||
}
|
||||
event.path = file;
|
||||
event.time = SecurityGuardUtils::GetDate();
|
||||
|
@ -238,8 +238,8 @@ void to_json(json &jsonObj, const EventContentSt &eventContentSt)
|
||||
|
||||
void from_json(const json &jsonObj, EventContentSt &eventContentSt)
|
||||
{
|
||||
JsonCfg::Unmarshal(eventContentSt.status, jsonObj, EVENT_CONTENT_STATUS_KEY);
|
||||
JsonCfg::Unmarshal(eventContentSt.cred, jsonObj, EVENT_CONTENT_CRED_KEY);
|
||||
JsonCfg::Unmarshal(eventContentSt.extra, jsonObj, EVENT_CONTENT_EXTRA_KEY);
|
||||
(void)JsonCfg::Unmarshal(eventContentSt.status, jsonObj, EVENT_CONTENT_STATUS_KEY);
|
||||
(void)JsonCfg::Unmarshal(eventContentSt.cred, jsonObj, EVENT_CONTENT_CRED_KEY);
|
||||
(void)JsonCfg::Unmarshal(eventContentSt.extra, jsonObj, EVENT_CONTENT_EXTRA_KEY);
|
||||
}
|
||||
}
|
@ -97,7 +97,7 @@ void DataCollectManagerService::OnStart()
|
||||
AddSystemAbilityListener(RISK_ANALYSIS_MANAGER_SA_ID);
|
||||
AddSystemAbilityListener(DFX_SYS_HIVIEW_ABILITY_ID);
|
||||
bool success = ConfigManager::InitConfig<EventConfig>();
|
||||
if (!success) {
|
||||
if (!success) {
|
||||
SGLOGE("init event config error");
|
||||
}
|
||||
std::vector<int64_t> eventIds = ConfigDataManager::GetInstance().GetAllEventIds();
|
||||
|
@ -30,6 +30,9 @@ int RdbEventStoreCallback::OnCreate(NativeRdb::RdbStore &rdbStore)
|
||||
}
|
||||
for (size_t i = 0; i < size; i++) {
|
||||
ret = rdbStore.ExecuteSql(createTableSqlVec_[i]);
|
||||
if (ret == NativeRdb::E_ERROR) {
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
@ -85,7 +85,7 @@ bool DataCollection::SecurityGuardSubscribeCollector(const std::vector<int64_t>&
|
||||
}
|
||||
ret = LoadCollector(eventId, collectorPath, nullptr);
|
||||
if (ret != SUCCESS) {
|
||||
LOGE("GetCollectorPath failed, eventId is 0x%{public}" PRIx64, eventId);
|
||||
LOGE("LoadCollector failed, eventId is 0x%{public}" PRIx64, eventId);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ public:
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
static bool UpdataConfig()
|
||||
static bool UpdateConfig()
|
||||
{
|
||||
T config;
|
||||
auto cfgOperator = std::make_unique<ConfigOperator>(config);
|
||||
|
@ -35,7 +35,7 @@ public:
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
static bool UpdataConfig()
|
||||
static bool UpdateConfig()
|
||||
{
|
||||
T config;
|
||||
auto cfgOperator = std::make_unique<ConfigOperator>(config);
|
||||
|
Loading…
Reference in New Issue
Block a user