MCPcopy Create free account
hub / github.com/bailey27/cppcryptfs / Unregister

Method Unregister

libcppcryptfs/util/KeyCache.cpp:146–163  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

144}
145
146bool KeyCache::Unregister(id_t id)
147{
148 lock_guard<mutex> lock(m_mutex);
149
150 auto it = m_entries.find(id);
151
152 assert(it != m_entries.end());
153
154 if (it == m_entries.end())
155 return false;
156
157 if (it->second.valid)
158 m_valid_count--;
159
160 m_entries.erase(it);
161
162 return true;
163}
164
165void KeyCache::Enable()
166{

Callers 1

~KeybufManagerMethod · 0.80

Calls 2

findMethod · 0.80
eraseMethod · 0.80

Tested by

no test coverage detected