Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

No rx/tx in request any longer

  • Loading branch information...
commit c5bf1d4da09396eaaf9535dc8f9aef8ed98451d7 1 parent 648a4c1
Alvaro Lopez Ortega alobbs authored
Showing with 0 additions and 41 deletions.
  1. +0 −41 cherokee/request.c
41 cherokee/request.c
View
@@ -111,11 +111,6 @@ cherokee_request_new (cherokee_request_t **req)
n->io_entry_ref = NULL;
n->thread = NULL;
n->conn = NULL;
- n->rx = 0;
- n->tx = 0;
- n->rx_partial = 0;
- n->tx_partial = 0;
- n->traffic_next = 0;
n->validator = NULL;
n->expiration = cherokee_expiration_none;
n->expiration_time = 0;
@@ -291,11 +286,6 @@ cherokee_request_clean (cherokee_request_t *req,
req->logger_ref = NULL;
req->mmaped = NULL;
req->mmaped_len = 0;
- req->rx = 0;
- req->tx = 0;
- req->rx_partial = 0;
- req->tx_partial = 0;
- req->traffic_next = 0;
req->expiration = cherokee_expiration_none;
req->expiration_time = 0;
req->expiration_prop = cherokee_expiration_prop_none;
@@ -1128,37 +1118,6 @@ cherokee_request_send_header_and_mmaped (cherokee_request_t *req)
}
-void
-cherokee_request_rx_add (cherokee_request_t *req, ssize_t rx)
-{
- if (likely (rx > 0)) {
- req->rx += rx;
- req->rx_partial += rx;
- }
-}
-
-
-void
-cherokee_request_tx_add (cherokee_request_t *req, ssize_t tx)
-{
- cuint_t to_sleep;
-
- /* Count it
- */
- req->tx += tx;
- req->tx_partial += tx;
-
- /* Traffic shaping
- */
- if (req->limit_rate) {
- to_sleep = (tx * 1000) / req->limit_bps;
-
- /* It's meant to sleep for a while */
- req->limit_blocked_until = cherokee_bogonow_msec + to_sleep;
- }
-}
-
-
ret_t
cherokee_request_recv (cherokee_request_t *req,
cherokee_buffer_t *buffer,

2 comments on commit c5bf1d4

Stefan de Konink
Collaborator

If this is removed, does this mean shaping (for now) is removed as feature?

Alvaro Lopez Ortega
Owner
Please sign in to comment.
Something went wrong with that request. Please try again.