Skip to content
This repository
Browse code

No rx/tx in request any longer

  • Loading branch information...
commit c5bf1d4da09396eaaf9535dc8f9aef8ed98451d7 1 parent 648a4c1
Alvaro Lopez Ortega authored February 10, 2012

Showing 1 changed file with 0 additions and 41 deletions. Show diff stats Hide diff stats

  1. 41  cherokee/request.c
41  cherokee/request.c
@@ -111,11 +111,6 @@ cherokee_request_new  (cherokee_request_t **req)
111 111
 	n->io_entry_ref              = NULL;
112 112
 	n->thread                    = NULL;
113 113
 	n->conn                      = NULL;
114  
-	n->rx                        = 0;
115  
-	n->tx                        = 0;
116  
-	n->rx_partial                = 0;
117  
-	n->tx_partial                = 0;
118  
-	n->traffic_next              = 0;
119 114
 	n->validator                 = NULL;
120 115
 	n->expiration                = cherokee_expiration_none;
121 116
 	n->expiration_time           = 0;
@@ -291,11 +286,6 @@ cherokee_request_clean (cherokee_request_t *req,
291 286
 	req->logger_ref           = NULL;
292 287
 	req->mmaped               = NULL;
293 288
 	req->mmaped_len           = 0;
294  
-	req->rx                   = 0;
295  
-	req->tx                   = 0;
296  
-	req->rx_partial           = 0;
297  
-	req->tx_partial           = 0;
298  
-	req->traffic_next         = 0;
299 289
 	req->expiration           = cherokee_expiration_none;
300 290
 	req->expiration_time      = 0;
301 291
 	req->expiration_prop      = cherokee_expiration_prop_none;
@@ -1128,37 +1118,6 @@ cherokee_request_send_header_and_mmaped (cherokee_request_t *req)
1128 1118
 }
1129 1119
 
1130 1120
 
1131  
-void
1132  
-cherokee_request_rx_add (cherokee_request_t *req, ssize_t rx)
1133  
-{
1134  
-	if (likely (rx > 0)) {
1135  
-		req->rx += rx;
1136  
-		req->rx_partial += rx;
1137  
-	}
1138  
-}
1139  
-
1140  
-
1141  
-void
1142  
-cherokee_request_tx_add (cherokee_request_t *req, ssize_t tx)
1143  
-{
1144  
-	cuint_t to_sleep;
1145  
-
1146  
-	/* Count it
1147  
-	 */
1148  
-	req->tx += tx;
1149  
-	req->tx_partial += tx;
1150  
-
1151  
-	/* Traffic shaping
1152  
-	 */
1153  
-	if (req->limit_rate) {
1154  
-		to_sleep = (tx * 1000) / req->limit_bps;
1155  
-
1156  
-		/* It's meant to sleep for a while */
1157  
-		req->limit_blocked_until = cherokee_bogonow_msec + to_sleep;
1158  
-	}
1159  
-}
1160  
-
1161  
-
1162 1121
 ret_t
1163 1122
 cherokee_request_recv (cherokee_request_t *req,
1164 1123
 		       cherokee_buffer_t  *buffer,

2 notes 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.