Module: sip-router
Branch: master
Commit: 3303a5b1f7c4ead6b0edd21d20e65b9957359200
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=3303a5b1f7c4ead6b0edd21d20e65b9957359200

Author: Marius Zbihlei <[email protected]>
Committer: Marius Zbihlei <[email protected]>
Date:   Wed Feb 17 13:57:05 2010 +0200

Modules/registrar : update stats even if -DSTATISTICS was not passed to the 
compiles(this was the default)

update_stat was called even if the statistics where not added to the stats 
framework.

---

 modules_k/registrar/save.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/modules_k/registrar/save.c b/modules_k/registrar/save.c
index b641479..3b479f6 100644
--- a/modules_k/registrar/save.c
+++ b/modules_k/registrar/save.c
@@ -780,18 +780,16 @@ int save(struct sip_msg* _m, char* _d, char* _cflags)
                        goto error;
                ret = (ret==0)?1:ret;
        }
-#ifdef STATISTICS
+
        update_stat(accepted_registrations, 1);
-#endif
+
        /* Only send reply upon request, not upon reply */
        if ((route_type == REQUEST_ROUTE) && !is_cflag_set(REG_SAVE_NORPL_FL) 
&& (reg_send_reply(_m) < 0))
                return -1;
 
        return ret;
 error:
-#ifdef STATISTICS
        update_stat(rejected_registrations, 1);
-#endif
        if ((route_type == REQUEST_ROUTE) && !is_cflag_set(REG_SAVE_NORPL_FL) )
                reg_send_reply(_m);
 


_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to