Module: sip-router
Branch: tmp/k3.0_sr_backports
Commit: c7ccd4a4cd8aa1e4e7bcb0d9419edcc15ae94034
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=c7ccd4a…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Fri Oct 23 16:39:59 2009 +0200
update drp_rpls statistics
(cherry picked from commit 770ced3)
---
forward.c | 6 +++++-
receive.c | 4 ++++
2 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/forward.c b/forward.c
index a7328e3..eae80ed 100644
--- a/forward.c
+++ b/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
diff --git a/receive.c b/receive.c
index 5047d3a..4b0c755 100644
--- a/receive.c
+++ b/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 */
}
}