Browse Source

need const char * anyway

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

4
passphrase_cache.cc

@ -45,7 +45,7 @@ namespace pEp {
_cache.splice(_cache.end(), _cache, entry); _cache.splice(_cache.end(), _cache, entry);
} }
std::string PassphraseCache::latest_passphrase() const char *PassphraseCache::latest_passphrase()
{ {
std::lock_guard<std::mutex> lock(_mtx); std::lock_guard<std::mutex> lock(_mtx);
@ -58,7 +58,7 @@ namespace pEp {
} }
--_which; --_which;
return _which->passphrase; return _which->passphrase.c_str();
} }
}; };

2
passphrase_cache.hh

@ -56,7 +56,7 @@ namespace pEp {
// this function is throwing std::underflow_error when no passphrases // this function is throwing std::underflow_error when no passphrases
// are left // are left
std::string latest_passphrase(); const char *latest_passphrase();
// convenience functions // convenience functions
// i.e. // i.e.

Loading…
Cancel
Save