From f77abc65a2ec7e662ac383a9fc3a9739d1142b2d Mon Sep 17 00:00:00 2001 From: Wilfried Goesgens Date: Sun, 19 Aug 2012 17:26:34 +0200 Subject: [PATCH] SMTP-Queue display: wrap lines after ; so we get one line per error message. --- webcit/smtpqueue.c | 13 +++++++++++++ webcit/static/t/view_mailq/recipient.html | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/webcit/smtpqueue.c b/webcit/smtpqueue.c index fc95a0dc6..8bf02a7f6 100644 --- a/webcit/smtpqueue.c +++ b/webcit/smtpqueue.c @@ -250,6 +250,7 @@ void QItem_Handle_SenderRoom(OneQueItem *Item, StrBuf *Line, const char **Pos) void QItem_Handle_Recipient(OneQueItem *Item, StrBuf *Line, const char **Pos) { + const char *pch; if (Item->Current == NULL) NewMailQEntry(Item); if (Item->Current->Recipient == NULL) @@ -257,6 +258,18 @@ void QItem_Handle_Recipient(OneQueItem *Item, StrBuf *Line, const char **Pos) StrBufExtract_NextToken(Item->Current->Recipient, Line, Pos, '|'); Item->Current->Status = StrBufExtractNext_int(Line, Pos, '|'); StrBufExtract_NextToken(Item->Current->StatusMessage, Line, Pos, '|'); + + pch = ChrPtr(Item->Current->StatusMessage); + while ((pch != NULL) && (*pch != '\0')) { + pch = strchr(pch, ';'); + if (pch != NULL) { + pch ++; + if (*pch == ' ') { + StrBufPeek(Item->Current->StatusMessage, + pch, -1, '\n'); + } + } + } Item->Current = NULL; // TODO: is this always right? } diff --git a/webcit/static/t/view_mailq/recipient.html b/webcit/static/t/view_mailq/recipient.html index 62dd82185..3a0a79da2 100644 --- a/webcit/static/t/view_mailq/recipient.html +++ b/webcit/static/t/view_mailq/recipient.html @@ -1,4 +1,4 @@ - +
-- 2.30.2