From f0ab53a254771a8dd0ae93f6513b4ef2bbbf9bcb Mon Sep 17 00:00:00 2001 From: corvid Date: Fri, 9 Nov 2012 06:46:52 +0000 Subject: Trim down the "pending data not sent" messages. I was running with remote stylesheets and image loading earlier, and these messages grew irritating... --- src/IO/IO.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/IO/IO.c') diff --git a/src/IO/IO.c b/src/IO/IO.c index 4b0285f2..1243c70a 100644 --- a/src/IO/IO.c +++ b/src/IO/IO.c @@ -369,8 +369,11 @@ void a_IO_ccc(int Op, int Branch, int Dir, ChainLink *Info, case OpAbort: io = Info->LocalKey; if (io->Buf->len > 0) { - MSG_WARN("IO_write, closing with pending data not sent\n"); - MSG_WARN(" \"%s\"\n", dStr_printable(io->Buf, 2048)); + char *newline = memchr(io->Buf->str, '\n', io->Buf->len); + int msglen = newline ? newline - io->Buf->str : 2048; + + MSG_WARN("IO_write, closing with pending data not sent: " + "\"%s\"\n", dStr_printable(io->Buf, msglen)); } /* close FD, remove from ValidIOs and remove its watch */ IO_close_fd(io, Op == OpEnd ? IO_StopWr : IO_StopRdWr); -- cgit v1.2.3