Browse Source

update drp_reqs statistics
(cherry picked from commit f4b64fc173c4ecc470346f05514af43adbda294a)

Daniel-Constantin Mierla 16 years ago
parent
commit
45a368cb04
2 changed files with 5 additions and 0 deletions
  1. 2 0
      forward.c
  2. 3 0
      receive.c

+ 2 - 0
forward.c

@@ -584,6 +584,8 @@ end:
 	/* received_buf & line_buf will be freed in receive_msg by free_lump_list*/
 	if(ret==0)
 		sr_event_exec(SREV_CORE_STATS, (void*)1);
+	else
+		sr_event_exec(SREV_CORE_STATS, (void*)3);
 	return ret;
 }
 

+ 3 - 0
receive.c

@@ -183,7 +183,10 @@ int receive_msg(char* buf, unsigned int len, struct receive_info* rcv_info)
 		   on via1 being parsed in a pre-script callback --andrei
 		*/
 		if (exec_pre_script_cb(msg, REQUEST_CB_TYPE)==0 )
+		{
+			sr_event_exec(SREV_CORE_STATS, (void*)3);
 			goto end; /* drop the request */
+		}
 
 		set_route_type(REQUEST_ROUTE);
 		/* exec the routing script */