diff options
author | Vincent Richard <[email protected]> | 2013-04-18 10:14:12 +0000 |
---|---|---|
committer | Vincent Richard <[email protected]> | 2013-04-18 10:14:12 +0000 |
commit | ff05f2228e27928e1bdcfcd8b3742b13ac2c7440 (patch) | |
tree | 7b7f3488fbb63692f2d17b6e2cc8041f0cb990d4 | |
parent | Added filtered output stream to transform LFs to CRLFs. (diff) | |
download | vmime-ff05f2228e27928e1bdcfcd8b3742b13ac2c7440.tar.gz vmime-ff05f2228e27928e1bdcfcd8b3742b13ac2c7440.zip |
Fixed double read of response.
-rw-r--r-- | src/net/smtp/SMTPTransport.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/net/smtp/SMTPTransport.cpp b/src/net/smtp/SMTPTransport.cpp index 853ffe35..30da3eff 100644 --- a/src/net/smtp/SMTPTransport.cpp +++ b/src/net/smtp/SMTPTransport.cpp @@ -631,8 +631,10 @@ void SMTPTransport::send { commands->writeToSocket(m_socket); - if ((resp = readResponse())->getCode() != 250 && - (resp = readResponse())->getCode() != 251) + resp = readResponse(); + + if (resp->getCode() != 250 && + resp->getCode() != 251) { internalDisconnect(); throw exceptions::command_error(commands->getLastCommandSent()->getText(), resp->getText()); |