mirror of
https://gitee.com/openharmony/distributeddatamgr_datamgr_service
synced 2024-11-23 06:50:35 +00:00
commit
ddfbdd162f
@ -86,6 +86,10 @@ MetaDataManager::Filter::Filter(const std::string &pattern) : pattern_(pattern)
|
||||
|
||||
void MetaObserver::OnChange(const DistributedDB::KvStoreChangedData &data)
|
||||
{
|
||||
if (filter_ == nullptr) {
|
||||
ZLOGE("filter_ is nullptr!");
|
||||
return;
|
||||
}
|
||||
auto values = { &data.GetEntriesInserted(), &data.GetEntriesUpdated(), &data.GetEntriesDeleted() };
|
||||
int32_t next = MetaDataManager::INSERT;
|
||||
for (auto value : values) {
|
||||
@ -117,6 +121,10 @@ void MetaObserver::HandleChanges(int32_t flag, std::vector<std::vector<Type>> &p
|
||||
if (priData.empty()) {
|
||||
return;
|
||||
}
|
||||
if (filter_ == nullptr) {
|
||||
ZLOGE("filter_ is nullptr!");
|
||||
return;
|
||||
}
|
||||
for (const auto &priKey : priData) {
|
||||
if (priKey.empty()) {
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user