Module: sip-router
Branch: tmp/k3.0_sr_backports
Commit: 45a368cb040ef8e94fa39d1ddf6fe85faabce8f4
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=45a368c…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Fri Oct 23 16:48:16 2009 +0200
update drp_reqs statistics
(cherry picked from commit f4b64fc173c4ecc470346f05514af43adbda294a)
---
forward.c | 2 ++
receive.c | 3 +++
2 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/forward.c b/forward.c
index eae80ed..3a4fbf4 100644
--- a/forward.c
+++ b/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;
}
diff --git a/receive.c b/receive.c
index 4b0c755..60eefa7 100644
--- a/receive.c
+++ b/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 */