From 7064b9696190e3952373865ce538b98cf278d8f6 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Mon, 21 Jul 2008 20:49:12 +0000 Subject: * Fix endles loop condition by not closing connection properly once finished. * Fix build issues on FreeBSD. --- daemon/request.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'daemon/request.c') diff --git a/daemon/request.c b/daemon/request.c index 30c9d2f..53738c0 100644 --- a/daemon/request.c +++ b/daemon/request.c @@ -675,6 +675,7 @@ ha_request_process (ha_request_t *rq) { int ret, cont = 1; + assert (!ha_buferr (&rq->req_buf)); ha_bufreset (&rq->req_buf); ret = read_request (rq); @@ -688,6 +689,10 @@ ha_request_process (ha_request_t *rq) log_request (rq); + /* Read request said there's no more */ + if (ret == 0) + cont = 0; + switch(rq->req_type) { case REQTYPE_AUTH: ret = process_auth (rq); -- cgit v1.2.3