SMTP-Client: on success strip reply too.
[citadel.git] / citadel / modules / smtp / smtp_clienthandlers.c
index c974e822bf7d63b2fc8d019d2964de4012fcfef6..e7ccae385bf33a4acef572684847d623b9eec916 100644 (file)
@@ -92,6 +92,7 @@
                Msg->MyQEntry->Status = WHICH_ERR;                     \
                StrBufAppendBufPlain(Msg->MyQEntry->StatusMessage,     \
                                     HKEY(ERRSTR), 0);                 \
+               StrBufTrim(Msg->MyQEntry->StatusMessage);              \
                return eAbort; }                                       \
        while (0)
 
                StrBufPlain(Msg->MyQEntry->StatusMessage,      \
                            ChrPtr(Msg->IO.IOBuf) + 4,         \
                            StrLength(Msg->IO.IOBuf) - 4);     \
+               StrBufTrim(Msg->MyQEntry->StatusMessage);      \
                return eAbort; }                               \
        while (0)
 
@@ -354,6 +356,7 @@ eNextState SMTPC_read_data_body_reply(SmtpOutMsg *Msg)
        StrBufPlain(Msg->MyQEntry->StatusMessage,
                    &ChrPtr(Msg->IO.RecvBuf.Buf)[4],
                    StrLength(Msg->IO.RecvBuf.Buf) - 4);
+       StrBufTrim(Msg->MyQEntry->StatusMessage);
        Msg->MyQEntry->Status = 2;
        return eSendReply;
 }