Selaa lähdekoodia

update drp_rpls statistics

(cherry picked from commit 770ced3)
Daniel-Constantin Mierla 16 vuotta sitten
vanhempi
commit
c7ccd4a4cd
2 muutettua tiedostoa jossa 9 lisäystä ja 1 poistoa
  1. 5 1
      forward.c
  2. 4 0
      receive.c

+ 5 - 1
forward.c

@@ -736,7 +736,11 @@ int forward_reply(struct sip_msg* msg)
 				
 	} 
 #endif
-	if (msg_send(&dst, new_buf, new_len)<0) goto error;
+	if (msg_send(&dst, new_buf, new_len)<0)
+	{
+		sr_event_exec(SREV_CORE_STATS, (void*)4);
+		goto error;
+	}
 #ifdef STATS
 	STATS_TX_RESPONSE(  (msg->first_line.u.reply.statuscode/100) );
 #endif

+ 4 - 0
receive.c

@@ -226,7 +226,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, ONREPLY_CB_TYPE)==0 )
+		{
+			sr_event_exec(SREV_CORE_STATS, (void*)4);
 			goto end; /* drop the request */
+		}
 
 		/* exec the onreply routing script */
 		if (onreply_rt.rlist[DEFAULT_RT]){
@@ -240,6 +243,7 @@ int receive_msg(char* buf, unsigned int len, struct receive_info* rcv_info)
 			}else
 #endif /* NO_ONREPLY_ROUTE_ERROR */
 			if (unlikely(ret==0 || (ctx.run_flags&DROP_R_F))){
+				sr_event_exec(SREV_CORE_STATS, (void*)4);
 				goto skip_send_reply; /* drop the message, no error */
 			}
 		}