SMTP-Client: alocate the Statusmessage big enough so we don't reallocate them later on.
authorWilfried Goesgens <dothebart@citadel.org>
Sat, 5 May 2012 15:17:12 +0000 (17:17 +0200)
committerWilfried Goesgens <dothebart@citadel.org>
Sat, 5 May 2012 15:17:12 +0000 (17:17 +0200)
citadel/modules/smtp/serv_smtpqueue.c

index c0af5c0f57f36f32829c8e06b716f5801eeabd0c..2f7c3a5905cbe2a16596f17baeaf161ed26b65e2 100644 (file)
@@ -397,7 +397,8 @@ void NewMailQEntry(OneQueItem *Item)
 
        if (Item->MailQEntries == NULL)
                Item->MailQEntries = NewHash(1, Flathash);
-       Item->Current->StatusMessage = NewStrBuf();
+       /* alocate big buffer so we won't get problems reallocating later. */
+       Item->Current->StatusMessage = NewStrBufPlain(NULL, SIZ);
        Item->Current->n = GetCount(Item->MailQEntries);
        Put(Item->MailQEntries,
            IKEY(Item->Current->n),