Browse code

update drp_rpls statistics

(cherry picked from commit 770ced3)

Daniel-Constantin Mierla authored on 23/10/2009 14:39:59
Showing 2 changed files
... ...
@@ -736,7 +736,11 @@ int forward_reply(struct sip_msg* msg)
736 736
 				
737 737
 	} 
738 738
 #endif
739
-	if (msg_send(&dst, new_buf, new_len)<0) goto error;
739
+	if (msg_send(&dst, new_buf, new_len)<0)
740
+	{
741
+		sr_event_exec(SREV_CORE_STATS, (void*)4);
742
+		goto error;
743
+	}
740 744
 #ifdef STATS
741 745
 	STATS_TX_RESPONSE(  (msg->first_line.u.reply.statuscode/100) );
742 746
 #endif
... ...
@@ -226,7 +226,10 @@ int receive_msg(char* buf, unsigned int len, struct receive_info* rcv_info)
226 226
 		   on via1 being parsed in a pre-script callback --andrei
227 227
 		*/
228 228
 		if (exec_pre_script_cb(msg, ONREPLY_CB_TYPE)==0 )
229
+		{
230
+			sr_event_exec(SREV_CORE_STATS, (void*)4);
229 231
 			goto end; /* drop the request */
232
+		}
230 233
 
231 234
 		/* exec the onreply routing script */
232 235
 		if (onreply_rt.rlist[DEFAULT_RT]){
... ...
@@ -240,6 +243,7 @@ int receive_msg(char* buf, unsigned int len, struct receive_info* rcv_info)
240 240
 			}else
241 241
 #endif /* NO_ONREPLY_ROUTE_ERROR */
242 242
 			if (unlikely(ret==0 || (ctx.run_flags&DROP_R_F))){
243
+				sr_event_exec(SREV_CORE_STATS, (void*)4);
243 244
 				goto skip_send_reply; /* drop the message, no error */
244 245
 			}
245 246
 		}