From: Adam Dickmeiss Date: Wed, 19 Oct 2011 09:31:38 +0000 (+0200) Subject: Flush HTTP recording file X-Git-Tag: v1.6.4~5^2~2 X-Git-Url: http://git.indexdata.com/?a=commitdiff_plain;h=3711bf09aa1125b5277926c29cc0526df68194ac;p=pazpar2-moved-to-github.git Flush HTTP recording file --- diff --git a/src/http.c b/src/http.c index 2df1706..ef88f17 100644 --- a/src/http.c +++ b/src/http.c @@ -926,6 +926,7 @@ static void http_io(IOCHAN i, int event) (long long) iochan_getfd(i), sz); for (hb = hc->iqueue; hb; hb = hb->next) fwrite(hb->buf, 1, hb->len, hc->http_server->record_file); + fflush(hc->http_server->record_file); } #endif if (!(hc->request = http_parse_request(hc, &hc->iqueue, reqlen))) @@ -979,6 +980,8 @@ static void http_io(IOCHAN i, int event) (long long) iochan_getfd(i), sz); fwrite(wb->buf, 1, wb->offset + wb->len, hc->http_server->record_file); + fputc('\n', hc->http_server->record_file); + fflush(hc->http_server->record_file); } #endif hc->oqueue = hc->oqueue->next;