MCPcopy Create free account
hub / github.com/dobin/RedEdr / RefreshTargetMatching

Method RefreshTargetMatching

RedEdrShared/process_resolver.cpp:204–218  ·  view source on GitHub ↗

Re-evaluate all cached processes with current target names

Source from the content-addressed store, hash-verified

202
203// Re-evaluate all cached processes with current target names
204void ProcessResolver::RefreshTargetMatching() {
205 LOG_A(LOG_INFO, "ProcessResolver: Re-evaluating all cached processes with current target names");
206 std::lock_guard<std::mutex> lock(cache_mutex);
207
208 for (auto& pair : cache) {
209 DWORD pid = pair.first;
210 Process& process = pair.second;
211 // Don't observe ourselves
212 if (contains_case_insensitive(process.name, "rededr.exe")) {
213 process.observe = FALSE;
214 continue;
215 }
216 process.ObserveIfMatchesTargets(targetProcessNames);
217 }
218}
219
220
221// Log statistics about the current cache state

Callers 2

ManagerApplyNewTargetsFunction · 0.80
ServiceControlPipeThreadFunction · 0.80

Calls 3

LOG_AFunction · 0.50

Tested by

no test coverage detected