return pool2_session != NULL;
}
-void session_process_counters(struct session *s) {
-
+void session_process_counters(struct session *s)
+{
unsigned long long bytes;
- if (s->req && s->req->total != s->logs.bytes_in) {
+ if (s->req) {
bytes = s->req->total - s->logs.bytes_in;
+ s->logs.bytes_in = s->req->total;
+ if (bytes) {
+ s->fe->bytes_in += bytes;
- s->fe->bytes_in += bytes;
-
- if (s->be != s->fe)
- s->be->bytes_in += bytes;
-
- if (s->srv)
- s->srv->bytes_in += bytes;
+ if (s->be != s->fe)
+ s->be->bytes_in += bytes;
- s->logs.bytes_in = s->req->total;
+ if (s->srv)
+ s->srv->bytes_in += bytes;
+ }
}
- if (s->rep && s->rep->total != s->logs.bytes_out) {
+ if (s->rep) {
bytes = s->rep->total - s->logs.bytes_out;
+ s->logs.bytes_out = s->rep->total;
+ if (bytes) {
+ s->fe->bytes_out += bytes;
- s->fe->bytes_out += bytes;
-
- if (s->be != s->fe)
- s->be->bytes_out += bytes;
-
- if (s->srv)
- s->srv->bytes_out += bytes;
+ if (s->be != s->fe)
+ s->be->bytes_out += bytes;
- s->logs.bytes_out = s->rep->total;
+ if (s->srv)
+ s->srv->bytes_out += bytes;
+ }
}
}