X-Git-Url: http://www.dolda2000.com/gitweb/?a=blobdiff_plain;f=src%2Faccesslog.c;h=a3894bf248b071a5302c3a99a669d8579aa804b4;hb=b71ad67f41a9e99bd243d57b5038de28f1696f27;hp=536f118c3d8c5e5bb777b9356f47c8552aa842e9;hpb=5c805444cbad6fd90a34504d154411bee62c84b5;p=ashd.git diff --git a/src/accesslog.c b/src/accesslog.c index 536f118..a3894bf 100644 --- a/src/accesslog.c +++ b/src/accesslog.c @@ -249,10 +249,10 @@ static void filterreq(struct muth *mt, va_list args) data = defdata; data.req = req; gettimeofday(&data.start, NULL); - cl = mtstdopen(fd, 1, 600, "r+"); + cl = mtstdopen(fd, 1, 600, "r+", NULL); if(socketpair(PF_UNIX, SOCK_STREAM, 0, pfds)) goto out; - hd = mtstdopen(pfds[1], 1, 600, "r+"); + hd = mtstdopen(pfds[1], 1, 600, "r+", NULL); if(sendreq(ch, req, pfds[0])) { close(pfds[0]); goto out; @@ -261,6 +261,8 @@ static void filterreq(struct muth *mt, va_list args) if(passdata(cl, hd, &data.bytesin)) goto out; + if(fflush(hd)) + goto out; shutdown(pfds[1], SHUT_WR); if((resp = parseresponse(hd)) == NULL) goto out;