From: petter Date: Mon, 11 Aug 2008 10:04:00 +0000 (+0000) Subject: It now always flushes the stream, even for stdout. See ticket #182. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=383ee5feaaf0175855c571847bdc7e7306d00803;p=varnish It now always flushes the stream, even for stdout. See ticket #182. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3080 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishncsa/varnishncsa.c b/varnish-cache/bin/varnishncsa/varnishncsa.c index 3c133aa0..8e7d6df8 100644 --- a/varnish-cache/bin/varnishncsa/varnishncsa.c +++ b/varnish-cache/bin/varnishncsa/varnishncsa.c @@ -452,9 +452,8 @@ h_ncsa(void *priv, enum shmlogtag tag, unsigned fd, fprintf(fo, "\"%s\"\n", lp->df_User_agent ? lp->df_User_agent : "-"); - /* hack: flush after every line if writing to file */ - if (fo != stdout) - fflush(fo); + /* flush the stream */ + fflush(fo); } /* clean up */