Browse code

- tcp accounting: connections_no decreased on error - parse_uri: missing break for r2 - tm: enabled tm stats

Andrei Pelinescu-Onciul authored on 24/02/2006 18:35:35
Showing 5 changed files
... ...
@@ -156,5 +156,5 @@ void tm_rpc_stats(rpc_t* rpc, void* c)
156 156
 			"4xx", tm_stats->completed_4xx,
157 157
 			"3xx", tm_stats->completed_3xx,
158 158
 			"2xx", tm_stats->completed_2xx);
159
-	rpc->fault(c, 100, "Trying");
159
+	/* rpc->fault(c, 100, "Trying"); */
160 160
 }
... ...
@@ -578,6 +578,7 @@ int parse_uri(char* buf, int len, struct sip_uri* uri)
578 578
 					case 'R':
579 579
 						b=p;
580 580
 						state=PR2_R;
581
+						break;
581 582
 					default:
582 583
 						state=URI_PARAM_P;
583 584
 				}
... ...
@@ -1025,6 +1026,7 @@ int parse_uri(char* buf, int len, struct sip_uri* uri)
1025 1025
 			uri->maddr.len, ZSW(uri->maddr.s), 
1026 1026
 			uri->maddr_val.len, ZSW(uri->maddr_val.s));
1027 1027
 	DBG("   lr=<%.*s>\n", uri->lr.len, ZSW(uri->lr.s)); 
1028
+	DBG("   r2=<%.*s>\n", uri->r2.len, ZSW(uri->r2.s));
1028 1029
 #endif
1029 1030
 	return 0;
1030 1031
 	
... ...
@@ -45,7 +45,7 @@
45 45
 struct route_list{
46 46
 	struct action** rlist;
47 47
 	int idx; /* first empty entry */ 
48
-	int entries; /* total number if entries */
48
+	int entries; /* total number of entries */
49 49
 	struct str_hash_table names; /* name to route index mappings */
50 50
 };
51 51
 
... ...
@@ -1473,12 +1473,12 @@ static inline int handle_new_connect(struct socket_info* si)
1473 1473
 		close(new_sock);
1474 1474
 		return 1; /* success, because the accept was succesfull */
1475 1475
 	}
1476
-	(*tcp_connections_no)++;
1477 1476
 	if (init_sock_opt(new_sock)<0){
1478 1477
 		LOG(L_ERR, "ERROR: handle_new_connect: init_sock_opt failed\n");
1479 1478
 		close(new_sock);
1480 1479
 		return 1; /* success, because the accept was succesfull */
1481 1480
 	}
1481
+	(*tcp_connections_no)++;
1482 1482
 	
1483 1483
 	/* add socket to list */
1484 1484
 	tcpconn=tcpconn_new(new_sock, &su, si, si->proto, S_CONN_ACCEPT);
... ...
@@ -1504,7 +1504,7 @@ static inline int handle_new_connect(struct socket_info* si)
1504 1504
 		LOG(L_ERR, "ERROR: handle_new_connect: tcpconn_new failed, "
1505 1505
 				"closing socket\n");
1506 1506
 		close(new_sock);
1507
-		
1507
+		(*tcp_connections_no)--;
1508 1508
 	}
1509 1509
 	return 1; /* accept() was succesfull */
1510 1510
 }
... ...
@@ -143,7 +143,7 @@ static inline unsigned short str2s(const char* s, unsigned int len,
143 143
 				i++;
144 144
 				if (i>5) goto error_digits;
145 145
 		}else{
146
-				//error unknown char
146
+				/* error unknown char */
147 147
 				goto error_char;
148 148
 		}
149 149
 	}