SMTP-Client: assign error status buffer on initialisation, so our bounce message...
authorWilfried Goesgens <dothebart@citadel.org>
Tue, 7 Feb 2012 21:55:45 +0000 (22:55 +0100)
committerWilfried Goesgens <dothebart@citadel.org>
Tue, 7 Feb 2012 21:55:45 +0000 (22:55 +0100)
citadel/modules/smtp/serv_smtpeventclient.c

index 9114746685ec2b3d6d07b9962b45d87497c4e347..3a65977ffc12c1dce78d76c1e9c45b83e7daaa09 100644 (file)
@@ -152,7 +152,7 @@ void FinalizeMessageSend(SmtpOutMsg *Msg)
        CtdlDeleteMessages(SMTP_SPOOLOUT_ROOM, &Msg->MyQItem->QueMsgID, 1, "");
 
        if (IDestructQueItem)
-               smtpq_do_bounce(Msg->MyQItem,Msg->msgtext);
+               smtpq_do_bounce(Msg->MyQItem, Msg->msgtext);
 
        if (nRemain > 0)
        {
@@ -379,7 +379,6 @@ eNextState smtp_resolve_mx_record_done(AsyncIO *IO)
        if ((IO->DNS.Query->DNSStatus == ARES_SUCCESS) &&
            (IO->DNS.Query->VParsedDNSReply != NULL))
        { /* ok, we found mx records. */
-               Msg->IO.ErrMsg = Msg->MyQEntry->StatusMessage;
 
                Msg->CurrMX
                        = Msg->AllMX
@@ -478,6 +477,8 @@ SmtpOutMsg *new_smtp_outmsg(OneQueItem *MyQItem,
                     SMTP_C_Timeout,
                     SMTP_C_Shutdown);
 
+       Msg->IO.ErrMsg = Msg->MyQEntry->StatusMessage;
+
        return Msg;
 }