SecureSMTPClientSession now uses _host from SMTPClientSession

This commit is contained in:
Günter Obiltschnig 2019-05-16 14:42:24 +02:00
parent dc4d36dad5
commit e98f752cff
2 changed files with 6 additions and 10 deletions

View File

@ -84,9 +84,6 @@ public:
/// ///
/// Returns true if the STARTTLS command was successful, /// Returns true if the STARTTLS command was successful,
/// false otherwise. /// false otherwise.
private:
std::string _host;
}; };

View File

@ -29,8 +29,7 @@ SecureSMTPClientSession::SecureSMTPClientSession(const StreamSocket& socket):
SecureSMTPClientSession::SecureSMTPClientSession(const std::string& host, Poco::UInt16 port): SecureSMTPClientSession::SecureSMTPClientSession(const std::string& host, Poco::UInt16 port):
SMTPClientSession(host, port), SMTPClientSession(host, port)
_host(host)
{ {
} }
@ -54,7 +53,7 @@ bool SecureSMTPClientSession::startTLS(Context::Ptr pContext)
status = sendCommand("STARTTLS", response); status = sendCommand("STARTTLS", response);
if (!isPositiveCompletion(status)) return false; if (!isPositiveCompletion(status)) return false;
SecureStreamSocket sss(SecureStreamSocket::attach(socket(), _host, pContext)); SecureStreamSocket sss(SecureStreamSocket::attach(socket(), host(), pContext));
socket() = sss; socket() = sss;
return true; return true;