Browse code

- removed some exported information: inactive_connection and number of requests (it was bogus anyway)

Andrei Pelinescu-Onciul authored on 10/02/2006 18:21:51
Showing 3 changed files
... ...
@@ -267,12 +267,10 @@ static void core_tcpinfo(rpc_t* rpc, void* c)
267 267
 	if (!tcp_disable){
268 268
 		tcp_get_info(&ti);
269 269
 		rpc->add(c, "{", &handle);
270
-		rpc->struct_add(handle, "ddddd",
270
+		rpc->struct_add(handle, "ddd",
271 271
 			"readers", ti.tcp_readers,
272 272
 			"max_connections", ti.tcp_max_connections,
273
-			"opened_connections", ti.tcp_connections_no,
274
-			"inactive_connections", ti.tcp_inactive_connections,
275
-			"total_requests", ti.tcp_total_requests
273
+			"opened_connections", ti.tcp_connections_no
276 274
 		);
277 275
 	}else{
278 276
 		rpc->fault(c, 500, "tcp support disabled");
... ...
@@ -35,8 +35,6 @@ struct tcp_gen_info{
35 35
 	int tcp_readers;
36 36
 	int tcp_max_connections;
37 37
 	int tcp_connections_no; /* crt. number */
38
-	int tcp_inactive_connections;
39
-	unsigned int tcp_total_requests;
40 38
 };
41 39
 
42 40
 
... ...
@@ -2041,23 +2041,9 @@ error:
2041 2041
 
2042 2042
 void tcp_get_info(struct tcp_gen_info *ti)
2043 2043
 {
2044
-	int r;
2045
-	int active_connections;
2046
-	unsigned int total_reqs;
2047
-	
2048
-	
2049 2044
 	ti->tcp_readers=tcp_children_no;
2050 2045
 	ti->tcp_max_connections=tcp_max_connections;
2051 2046
 	ti->tcp_connections_no=*tcp_connections_no;
2052
-	
2053
-	active_connections=0;
2054
-	total_reqs=0;
2055
-	for (r=0; r<tcp_children_no; r++){
2056
-		active_connections*=tcp_children[r].busy;
2057
-		total_reqs+=tcp_children[r].n_reqs;
2058
-	}
2059
-	ti->tcp_inactive_connections=*tcp_connections_no-active_connections;
2060
-	ti->tcp_total_requests=total_reqs;
2061 2047
 }
2062 2048
 
2063 2049
 #endif