diff options
-rw-r--r-- | src/net/imap/IMAPConnection.cpp | 2 | ||||
-rw-r--r-- | src/security/defaultAuthenticator.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/net/imap/IMAPConnection.cpp b/src/net/imap/IMAPConnection.cpp index 69dfcb1e..34888dae 100644 --- a/src/net/imap/IMAPConnection.cpp +++ b/src/net/imap/IMAPConnection.cpp @@ -191,7 +191,7 @@ void IMAPConnection::connect() void IMAPConnection::authenticate() { - getAuthenticator()->setService(thisRef().dynamicCast <service>()); + getAuthenticator()->setService(m_store.toStrong()); #if VMIME_HAVE_SASL_SUPPORT // First, try SASL authentication diff --git a/src/security/defaultAuthenticator.cpp b/src/security/defaultAuthenticator.cpp index 213a2630..339ba0c8 100644 --- a/src/security/defaultAuthenticator.cpp +++ b/src/security/defaultAuthenticator.cpp @@ -44,7 +44,7 @@ defaultAuthenticator::~defaultAuthenticator() const string defaultAuthenticator::getUsername() const { - const string& prefix = m_service->getInfos().getPropertyPrefix(); + const string prefix = m_service->getInfos().getPropertyPrefix(); const propertySet& props = m_service->getSession()->getProperties(); if (props.hasProperty(prefix + net::serviceInfos::property::AUTH_USERNAME.getName())) @@ -56,7 +56,7 @@ const string defaultAuthenticator::getUsername() const const string defaultAuthenticator::getPassword() const { - const string& prefix = m_service->getInfos().getPropertyPrefix(); + const string prefix = m_service->getInfos().getPropertyPrefix(); const propertySet& props = m_service->getSession()->getProperties(); if (props.hasProperty(prefix + net::serviceInfos::property::AUTH_PASSWORD.getName())) |