diff options
author | corvid <corvid@lavabit.com> | 2012-11-09 06:46:52 +0000 |
---|---|---|
committer | corvid <corvid@lavabit.com> | 2012-11-09 06:46:52 +0000 |
commit | f0ab53a254771a8dd0ae93f6513b4ef2bbbf9bcb (patch) | |
tree | 8e8fd0ba34dea08fd630532d81a7f139582cedc4 | |
parent | 2301445ae63bbdfad1f95fb737e37af1714f0022 (diff) |
Trim down the "pending data not sent" messages.
I was running with remote stylesheets and image loading earlier, and these
messages grew irritating...
-rw-r--r-- | src/IO/IO.c | 7 |
1 files changed, 5 insertions, 2 deletions
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); |