Now thanks to this the bufq_map field is expected to remain accurate.
appctx_release_buf(appctx, &appctx->outbuf);
task_destroy(appctx->t);
- if (LIST_INLIST(&appctx->buffer_wait.list))
- LIST_DEL_INIT(&appctx->buffer_wait.list);
+ b_dequeue(&appctx->buffer_wait);
if (appctx->sess)
session_free(appctx->sess);
BUG_ON(appctx->sedesc && !se_fl_test(appctx->sedesc, SE_FL_ORPHAN));
appctx->applet->release(appctx);
applet_fl_set(appctx, APPCTX_FL_SHUTDOWN);
- if (LIST_INLIST(&appctx->buffer_wait.list))
- LIST_DEL_INIT(&appctx->buffer_wait.list);
+ b_dequeue(&appctx->buffer_wait);
TRACE_LEAVE(APPLET_EV_RELEASE, appctx);
}
}
}
- if (LIST_INLIST(&check->buf_wait.list))
- LIST_DEL_INIT(&check->buf_wait.list);
+ b_dequeue(&check->buf_wait);
check_release_buf(check, &check->bi);
check_release_buf(check, &check->bo);
if (buf->size)
return 1;
- if (LIST_INLIST(&buffer_wait->list))
- LIST_DEL_INIT(&buffer_wait->list);
+ b_dequeue(buffer_wait);
if (b_alloc(buf, DB_CHANNEL))
return 1;
static void
spoe_release_buffer(struct buffer *buf, struct buffer_wait *buffer_wait)
{
- if (LIST_INLIST(&buffer_wait->list))
- LIST_DEL_INIT(&buffer_wait->list);
+ b_dequeue(buffer_wait);
/* Release the buffer if needed */
if (buf->size) {
TRACE_POINT(FCGI_EV_FCONN_END);
- if (LIST_INLIST(&fconn->buf_wait.list))
- LIST_DEL_INIT(&fconn->buf_wait.list);
+ b_dequeue(&fconn->buf_wait);
fcgi_release_buf(fconn, &fconn->dbuf);
fcgi_release_mbuf(fconn);
}
- if (LIST_INLIST(&h1c->buf_wait.list))
- LIST_DEL_INIT(&h1c->buf_wait.list);
-
+ b_dequeue(&h1c->buf_wait);
h1_release_buf(h1c, &h1c->ibuf);
h1_release_buf(h1c, &h1c->obuf);
hpack_dht_free(h2c->ddht);
- if (LIST_INLIST(&h2c->buf_wait.list))
- LIST_DEL_INIT(&h2c->buf_wait.list);
+ b_dequeue(&h2c->buf_wait);
h2_release_buf(h2c, &h2c->dbuf);
h2_release_mbuf(h2c);
}
/* We may still be present in the buffer wait queue */
- if (LIST_INLIST(&s->buffer_wait.list))
- LIST_DEL_INIT(&s->buffer_wait.list);
+ b_dequeue(&s->buffer_wait);
if (s->req.buf.size || s->res.buf.size) {
int count = !!s->req.buf.size + !!s->res.buf.size;