SMTP.cpp: fix gcc6 build
* Add curly braces to fix '-Werror=misleading-indentation' warnings. Signed-off-by: Augustin Cavalier <[email protected]>
This commit is contained in:
committed by
Augustin Cavalier
parent
5e885c5f1c
commit
f739df8e3c
@@ -907,12 +907,15 @@ SMTPProtocol::Send(const char* to, const char* from, BPositionIO *message)
|
|||||||
if (!foundCRLFPeriod) {
|
if (!foundCRLFPeriod) {
|
||||||
if (amountUnread <= 0) { // No more data, all we have is in the buffer.
|
if (amountUnread <= 0) { // No more data, all we have is in the buffer.
|
||||||
if (bufferLen > 0) {
|
if (bufferLen > 0) {
|
||||||
#ifdef USE_SSL
|
#ifdef USE_SSL
|
||||||
if (use_ssl)
|
if (use_ssl) {
|
||||||
SSL_write(ssl,data,bufferLen);
|
SSL_write(ssl,data,bufferLen);
|
||||||
else
|
} else {
|
||||||
#endif
|
send (fSocket,data, bufferLen,0);
|
||||||
|
}
|
||||||
|
#else
|
||||||
send (fSocket,data, bufferLen,0);
|
send (fSocket,data, bufferLen,0);
|
||||||
|
#endif
|
||||||
ReportProgress (bufferLen,0);
|
ReportProgress (bufferLen,0);
|
||||||
if (bufferLen >= 2)
|
if (bufferLen >= 2)
|
||||||
messageEndedWithCRLF = (data[bufferLen-2] == '\r' &&
|
messageEndedWithCRLF = (data[bufferLen-2] == '\r' &&
|
||||||
@@ -924,14 +927,18 @@ SMTPProtocol::Send(const char* to, const char* from, BPositionIO *message)
|
|||||||
// Send most of the buffer, except a few characters to overlap with
|
// Send most of the buffer, except a few characters to overlap with
|
||||||
// the next read, in case the CRLFPeriod is split between reads.
|
// the next read, in case the CRLFPeriod is split between reads.
|
||||||
if (bufferLen > 3) {
|
if (bufferLen > 3) {
|
||||||
#ifdef USE_SSL
|
#ifdef USE_SSL
|
||||||
if (use_ssl) {
|
if (use_ssl) {
|
||||||
if (SSL_write(ssl,data,bufferLen - 3) < 0)
|
if (SSL_write(ssl,data,bufferLen - 3) < 0)
|
||||||
break;
|
break;
|
||||||
} else
|
} else {
|
||||||
#endif
|
if (send (fSocket,data, bufferLen - 3,0) < 0)
|
||||||
|
break; // Stop when an error happens.
|
||||||
|
}
|
||||||
|
#else
|
||||||
if (send (fSocket,data, bufferLen - 3,0) < 0)
|
if (send (fSocket,data, bufferLen - 3,0) < 0)
|
||||||
break; // Stop when an error happens.
|
break; // Stop when an error happens.
|
||||||
|
#endif
|
||||||
ReportProgress (bufferLen - 3,0);
|
ReportProgress (bufferLen - 3,0);
|
||||||
memmove (data, data + bufferLen - 3, 3);
|
memmove (data, data + bufferLen - 3, 3);
|
||||||
bufferLen = 3;
|
bufferLen = 3;
|
||||||
|
|||||||
Reference in New Issue
Block a user