Module: sip-router Branch: kamailio_3.0 Commit: 770ced39b0b749355559e2a35bedf1b9c3674adc URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=770ced39...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: Fri Oct 23 16:39:59 2009 +0200
update drp_rpls statistics
---
forward.c | 6 +++++- receive.c | 9 +++++++-- 2 files changed, 12 insertions(+), 3 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 495f383..92f6bb0 100644 --- a/receive.c +++ b/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);