MCPcopy Create free account
hub / github.com/crosspoint-reader/crosspoint-reader / findCredential

Method findCredential

src/WifiCredentialStore.cpp:140–149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138}
139
140const WifiCredential* WifiCredentialStore::findCredential(const std::string& ssid) const {
141 const auto cred = find_if(credentials.begin(), credentials.end(),
142 [&ssid](const WifiCredential& cred) { return cred.ssid == ssid; });
143
144 if (cred != credentials.end()) {
145 return &*cred;
146 }
147
148 return nullptr;
149}
150
151bool WifiCredentialStore::hasSavedCredential(const std::string& ssid) const { return findCredential(ssid) != nullptr; }
152

Callers 2

onEnterMethod · 0.80
selectNetworkMethod · 0.80

Calls 2

endMethod · 0.80
beginMethod · 0.45

Tested by

no test coverage detected