From 322772c51b7c7dddf3927ada7dd6c3c9d5adbc82 Mon Sep 17 00:00:00 2001 From: ian Date: Fri, 11 Apr 2008 19:04:35 +0000 Subject: [PATCH] only autoflush if the message ends with \n --- hostside/obc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hostside/obc.c b/hostside/obc.c index 33ab3f2..8534890 100644 --- a/hostside/obc.c +++ b/hostside/obc.c @@ -63,7 +63,8 @@ static void addlink(OutBufferChain *ch, OutBuffer *ob) { events->on_fd(events, ch->fd, OOP_WRITE, writeable, ch); LIST_LINK_TAIL(ch->obs, ob); ch->total += ob->l; - obc_tryflush(ch); + if (ob->l>0 && ob->m[ob->l-1]=='\n') + obc_tryflush(ch); if (ch->total > ch->limit) { char what[128]; snprintf(what,sizeof(what)-1,"`%.*s...'", ob->l,ob->m); -- 2.30.2