fix spin on send when encoded body part doesn't end with newline, patch by me and ducarroz, sr=mscott 242718

This commit is contained in:
bienvenu%nventure.com 2004-05-06 13:17:26 +00:00
Родитель 5bdc54204c
Коммит 8a9aa1f26d
1 изменённых файлов: 5 добавлений и 1 удалений

Просмотреть файл

@ -475,6 +475,7 @@ nsMsgSendPart::Write()
{
int status = 0;
char *separator = nsnull;
PRBool needToWriteCRLFAfterEncodedBody = PR_FALSE;
#define PUSHLEN(str, length) \
do { \
@ -762,6 +763,7 @@ nsMsgSendPart::Write()
{
status = MIME_EncoderDestroy(m_encoder_data, PR_FALSE);
m_encoder_data = nsnull;
needToWriteCRLFAfterEncodedBody = !m_parent;
if (status < 0)
goto FAIL;
}
@ -800,7 +802,9 @@ nsMsgSendPart::Write()
PUSH(separator);
PUSH("--");
PUSH(CRLF);
}
}
else if (needToWriteCRLFAfterEncodedBody)
PUSH(CRLF);
FAIL:
PR_FREEIF(separator);