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

Author: Daniel-Constantin Mierla <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
Date:   Tue Jul 22 13:42:54 2014 +0200

uac: clean old records in timer callback after a while from a reload

---

 modules/uac/uac_reg.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/modules/uac/uac_reg.c b/modules/uac/uac_reg.c
index f1344be..0950557 100644
--- a/modules/uac/uac_reg.c
+++ b/modules/uac/uac_reg.c
@@ -966,6 +966,15 @@ void uac_reg_timer(unsigned int ticks)
                        it = it->next;
                }
        }
+
+       if(_reg_htable_gc!=NULL)
+       {
+               lock_get(_reg_htable_gc_lock);
+               if(_reg_htable_gc->stime!=0
+                               && _reg_htable_gc->stime < tn - 
UAC_REG_GC_INTERVAL)
+                       uac_reg_reset_ht_gc();
+               lock_release(_reg_htable_gc_lock);
+       }
 }
 
 #define reg_db_set_attr(attr, pos) do { \


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

Reply via email to