From 552b4a7690e19d684545414fe78763178ff6a88c Mon Sep 17 00:00:00 2001 From: Volker Birk Date: Sun, 28 Jun 2020 15:09:59 +0200 Subject: [PATCH] need const char * anyway --- passphrase_cache.cc | 4 ++-- passphrase_cache.hh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/passphrase_cache.cc b/passphrase_cache.cc index 6a60e7a..6c71c61 100644 --- a/passphrase_cache.cc +++ b/passphrase_cache.cc @@ -45,7 +45,7 @@ namespace pEp { _cache.splice(_cache.end(), _cache, entry); } - std::string PassphraseCache::latest_passphrase() + const char *PassphraseCache::latest_passphrase() { std::lock_guard lock(_mtx); @@ -58,7 +58,7 @@ namespace pEp { } --_which; - return _which->passphrase; + return _which->passphrase.c_str(); } }; diff --git a/passphrase_cache.hh b/passphrase_cache.hh index c8b4ddd..22334f9 100644 --- a/passphrase_cache.hh +++ b/passphrase_cache.hh @@ -56,7 +56,7 @@ namespace pEp { // this function is throwing std::underflow_error when no passphrases // are left - std::string latest_passphrase(); + const char *latest_passphrase(); // convenience functions // i.e.