Module: sip-router
Branch: 3.3
Commit: 64f64efb49782bb74080193863ac2d4775816add
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=64f64ef…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Committer: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Tue Sep 11 12:58:13 2012 +0100
modules_k/pua: Fixed incorrect check/use of update_period modparam
(cherry picked from commit ef7d43fc614276b75c560660c7e4368fd18d574d)
---
modules_k/pua/pua.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/modules_k/pua/pua.c b/modules_k/pua/pua.c
index b72f9e1..2297219 100644
--- a/modules_k/pua/pua.c
+++ b/modules_k/pua/pua.c
@@ -268,8 +268,13 @@ static int mod_init(void)
startup_time = (int) time(NULL);
- if (update_period > 0) /* probably should check > 5 here!! -croc */
+ if (update_period > 5)
register_timer(hashT_clean, 0, update_period- 5);
+ else if (update_period != 0)
+ {
+ LM_ERR("update_period must be 0 or > 5\n");
+ return -1;
+ }
if (dbmode != PUA_DB_ONLY)
{