Procházet zdrojové kódy

update drp_rpls statistics

Daniel-Constantin Mierla před 16 roky
rodič
revize
770ced39b0
2 změnil soubory, kde provedl 12 přidání a 3 odebrání
  1. 5 1
      forward.c
  2. 7 2
      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

+ 7 - 2
receive.c

@@ -225,7 +225,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]){
@@ -235,8 +238,10 @@ int receive_msg(char* buf, unsigned int len, struct receive_info* rcv_info)
 				LOG(L_WARN, "WARNING: receive_msg: "
 						"error while trying onreply script\n");
 				goto error_rpl;
-			}else if (ret==0) goto skip_send_reply; /* drop the message, 
-													   no error */
+			}else if (ret==0){
+				sr_event_exec(SREV_CORE_STATS, (void*)4);
+				goto skip_send_reply; /* drop the message, no error */
+			}
 		}
 		/* send the msg */
 		forward_reply(msg);