Browse Source

better naming

synchronous
Volker Birk 5 years ago
parent
commit
1aa042c038
  1. 4
      passphrase_cache.cc
  2. 2
      passphrase_cache.hh

4
passphrase_cache.cc

@ -48,7 +48,7 @@ namespace pEp {
const char *PassphraseCache::add_stored(const std::string& passphrase)
{
std::lock_guard<std::mutex> lock(_shared_mtx);
std::lock_guard<std::mutex> lock(_stored_mtx);
_stored = passphrase;
return _stored.c_str();
}
@ -59,7 +59,7 @@ namespace pEp {
return true;
{
std::lock_guard<std::mutex> lock(_shared_mtx);
std::lock_guard<std::mutex> lock(_stored_mtx);
if (!_stored.empty() && callee(_stored))
return true;
}

2
passphrase_cache.hh

@ -26,7 +26,7 @@ namespace pEp {
cache _cache;
std::string _stored;
std::mutex _mtx;
std::mutex _shared_mtx;
std::mutex _stored_mtx;
size_t _max_size;
duration _timeout;

Loading…
Cancel
Save