OPTIM/MINOR: move the hdr_idx pools out of the proxy struct

It makes no sense to have one pointer to the hdr_idx pool in each proxy
struct since these pools do not depend on the proxy. Let's have a common
pool instead as it is already the case for other types.
This commit is contained in:
Willy Tarreau
2011-10-24 18:15:04 +02:00
parent 9ed560e964
commit 34eb671f24
8 changed files with 35 additions and 30 deletions

View File

@@ -813,7 +813,7 @@ int session_set_backend(struct session *s, struct proxy *be)
* a struct hdr_idx for it if we did not have one.
*/
if (unlikely(!s->txn.hdr_idx.v && (be->acl_requires & ACL_USE_L7_ANY))) {
if ((s->txn.hdr_idx.v = pool_alloc2(s->fe->hdr_idx_pool)) == NULL)
if ((s->txn.hdr_idx.v = pool_alloc2(pool2_hdr_idx)) == NULL)
return 0; /* not enough memory */
/* and now initialize the HTTP transaction state */