MAJOR: channel: stop relying on BF_FULL to take action
This flag is quite complex to get right and updating it everywhere is a
major pain, especially since the buffer/channel split. This is the first
step of getting rid of it. Instead now it's dynamically computed whenever
needed.
diff --git a/src/frontend.c b/src/frontend.c
index ad4b970..aa6cb9e 100644
--- a/src/frontend.c
+++ b/src/frontend.c
@@ -396,11 +396,12 @@
return 1;
missing:
- if (!(req->flags & (BF_SHUTR|BF_FULL))) {
- buffer_dont_connect(s->req);
- return 0;
- }
/* missing data and buffer is either full or shutdown => fail */
+ if ((req->flags & BF_SHUTR) || buffer_full(&req->buf, global.tune.maxrewrite))
+ goto fail;
+
+ buffer_dont_connect(s->req);
+ return 0;
fail:
buffer_abort(req);