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

Author: Daniel-Constantin Mierla <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
Date:   Wed Jan  5 15:24:02 2011 +0100

rls(k): control loading db subs

- parameter that can be used to control the db load from config
(cherry picked from commit 25d8ec8b5962b3193b37186b06be5683e4a22fda)

---

 modules_k/rls/rls.c |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/modules_k/rls/rls.c b/modules_k/rls/rls.c
index b3fe8f4..7f77425 100644
--- a/modules_k/rls/rls.c
+++ b/modules_k/rls/rls.c
@@ -103,6 +103,7 @@ extract_sdialog_info_t pres_extract_sdialog_info;
 int rls_events= EVENT_PRESENCE;
 int to_presence_code= 1;
 int rls_max_expires= 7200;
+int rls_reload_db_subs = 0;
 
 /* functions imported from xcap_client module */
 xcapGetNewDoc_t xcap_GetNewDoc= 0;
@@ -186,6 +187,7 @@ static param_export_t params[]={
        /*address and port(default: 80):"http://192.168.2.132:8000/xcap-root"*/
        { "rls_event",              
STR_PARAM|USE_FUNC_PARAM,(void*)add_rls_event},
        { "outbound_proxy",         STR_PARAM,   &outbound_proxy.s              
 },
+       { "reload_db_subs",         INT_PARAM,   &rls_reload_db_subs            
 },
        {0,                                                     0,              
                0                                                    }
 };
 
@@ -356,10 +358,13 @@ static int mod_init(void)
                LM_ERR("while creating new hash table\n");
                return -1;
        }
-       if(rls_restore_db_subs()< 0)
+       if(rls_reload_db_subs!=0)
        {
-               LM_ERR("while restoring rl watchers table\n");
-               return -1;
+               if(rls_restore_db_subs()< 0)
+               {
+                       LM_ERR("while restoring rl watchers table\n");
+                       return -1;
+               }
        }
 
        if(rls_db)


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

Reply via email to