浏览代码

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

Andrei Pelinescu-Onciul 19 年之前
父节点
当前提交
e85eac0ab5
共有 3 个文件被更改,包括 2 次插入20 次删除
  1. 2 4
      core_cmd.c
  2. 0 2
      tcp_info.h
  3. 0 14
      tcp_main.c

+ 2 - 4
core_cmd.c

@@ -267,12 +267,10 @@ static void core_tcpinfo(rpc_t* rpc, void* c)
 	if (!tcp_disable){
 		tcp_get_info(&ti);
 		rpc->add(c, "{", &handle);
-		rpc->struct_add(handle, "ddddd",
+		rpc->struct_add(handle, "ddd",
 			"readers", ti.tcp_readers,
 			"max_connections", ti.tcp_max_connections,
-			"opened_connections", ti.tcp_connections_no,
-			"inactive_connections", ti.tcp_inactive_connections,
-			"total_requests", ti.tcp_total_requests
+			"opened_connections", ti.tcp_connections_no
 		);
 	}else{
 		rpc->fault(c, 500, "tcp support disabled");

+ 0 - 2
tcp_info.h

@@ -35,8 +35,6 @@ struct tcp_gen_info{
 	int tcp_readers;
 	int tcp_max_connections;
 	int tcp_connections_no; /* crt. number */
-	int tcp_inactive_connections;
-	unsigned int tcp_total_requests;
 };
 
 

+ 0 - 14
tcp_main.c

@@ -2041,23 +2041,9 @@ error:
 
 void tcp_get_info(struct tcp_gen_info *ti)
 {
-	int r;
-	int active_connections;
-	unsigned int total_reqs;
-	
-	
 	ti->tcp_readers=tcp_children_no;
 	ti->tcp_max_connections=tcp_max_connections;
 	ti->tcp_connections_no=*tcp_connections_no;
-	
-	active_connections=0;
-	total_reqs=0;
-	for (r=0; r<tcp_children_no; r++){
-		active_connections*=tcp_children[r].busy;
-		total_reqs+=tcp_children[r].n_reqs;
-	}
-	ti->tcp_inactive_connections=*tcp_connections_no-active_connections;
-	ti->tcp_total_requests=total_reqs;
 }
 
 #endif