smtp: Fixed an issue with the multi-interface always sending postdata
authorSteve Holme <steve_holme@hotmail.com>
Tue, 22 May 2012 21:08:25 +0000 (22:08 +0100)
committerSteve Holme <steve_holme@hotmail.com>
Tue, 22 May 2012 21:08:25 +0000 (22:08 +0100)
commitef60fdbd7367ea97446e7e2ed7ac91d411265431
treecd8c5373a57224b085977361adb97ebea77e8fb3
parentb1f081f6e65576a9f824182ca47873a75e1f9e0d
smtp: Fixed an issue with the multi-interface always sending postdata

Due to the result code being reset to CURLE_OK when smtp_dophase_done()
was called, postdata would incorrectly be sent to the server when the
MAIL FROM or RCPT command was rejected.

As such, libcurl would return the wrong result code from performing the
operation and additionally set CURLINFO_RESPONSE_CODE to be that
returned by the postdata command.

Bug: http://curl.haxx.se/mail/lib-2012-05/0108.html
Reported by: Gokhan Sengun
lib/smtp.c