update drp_rpls statistics
authorDaniel-Constantin Mierla <miconda@gmail.com>
Fri, 23 Oct 2009 14:39:59 +0000 (16:39 +0200)
committerAndrei Pelinescu-Onciul <andrei@iptel.org>
Mon, 1 Feb 2010 15:59:22 +0000 (16:59 +0100)
(cherry picked from commit 770ced3)

forward.c
receive.c

index a7328e3..eae80ed 100644 (file)
--- 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
index 5047d3a..4b0c755 100644 (file)
--- 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 */
                        }
                }