45
46
pool_free2(pool2_buffer, s->rep);
47
if (txn->hdr_idx.v != NULL)
48
pool_free2(s->fe->hdr_idx_pool, txn->hdr_idx.v);
50
if (txn->rsp.cap != NULL) {
52
for (h = s->fe->rsp_cap; h; h = h->next) {
53
if (txn->rsp.cap[h->index] != NULL)
54
pool_free2(h->pool, txn->rsp.cap[h->index]);
56
pool_free2(s->fe->rsp_cap_pool, txn->rsp.cap);
58
if (txn->req.cap != NULL) {
60
for (h = s->fe->req_cap; h; h = h->next) {
61
if (txn->req.cap[h->index] != NULL)
62
pool_free2(h->pool, txn->req.cap[h->index]);
64
pool_free2(s->fe->req_cap_pool, txn->req.cap);
49
if (txn->hdr_idx.v != NULL)
50
pool_free2(fe->hdr_idx_pool, txn->hdr_idx.v);
52
if (txn->rsp.cap != NULL) {
54
for (h = fe->rsp_cap; h; h = h->next) {
55
if (txn->rsp.cap[h->index] != NULL)
56
pool_free2(h->pool, txn->rsp.cap[h->index]);
58
pool_free2(fe->rsp_cap_pool, txn->rsp.cap);
60
if (txn->req.cap != NULL) {
62
for (h = fe->req_cap; h; h = h->next) {
63
if (txn->req.cap[h->index] != NULL)
64
pool_free2(h->pool, txn->req.cap[h->index]);
66
pool_free2(fe->req_cap_pool, txn->req.cap);
68
70
pool_free2(pool2_requri, txn->uri);
69
71
if (txn->cli_cookie)
72
74
pool_free2(pool2_capture, txn->srv_cookie);
74
76
pool_free2(pool2_session, s);
78
/* We may want to free the maximum amount of pools if the proxy is stopping */
79
if (fe && unlikely(fe->state == PR_STSTOPPED)) {
81
pool_flush2(pool2_buffer);
83
pool_flush2(fe->hdr_idx_pool);
85
pool_flush2(pool2_requri);
87
pool_flush2(pool2_capture);
89
pool_flush2(pool2_session);
91
pool_flush2(fe->req_cap_pool);
93
pool_flush2(fe->rsp_cap_pool);
82
102
return pool2_session != NULL;
105
void session_process_counters(struct session *s)
107
unsigned long long bytes;
110
bytes = s->req->total - s->logs.bytes_in;
111
s->logs.bytes_in = s->req->total;
113
s->fe->bytes_in += bytes;
116
s->be->bytes_in += bytes;
119
s->srv->bytes_in += bytes;
124
bytes = s->rep->total - s->logs.bytes_out;
125
s->logs.bytes_out = s->rep->total;
127
s->fe->bytes_out += bytes;
130
s->be->bytes_out += bytes;
133
s->srv->bytes_out += bytes;
87
139
* Local variables: