Browse code

rls(k): control loading db subs

- parameter that can be used to control the db load from config

Daniel-Constantin Mierla authored on 05/01/2011 14:24:02
Showing 1 changed files
... ...
@@ -103,6 +103,7 @@ extract_sdialog_info_t pres_extract_sdialog_info;
103 103
 int rls_events= EVENT_PRESENCE;
104 104
 int to_presence_code= 1;
105 105
 int rls_max_expires= 7200;
106
+int rls_reload_db_subs = 0;
106 107
 
107 108
 /* functions imported from xcap_client module */
108 109
 xcapGetNewDoc_t xcap_GetNewDoc= 0;
... ...
@@ -186,6 +187,7 @@ static param_export_t params[]={
186 186
 	/*address and port(default: 80):"http://192.168.2.132:8000/xcap-root"*/
187 187
 	{ "rls_event",              STR_PARAM|USE_FUNC_PARAM,(void*)add_rls_event},
188 188
 	{ "outbound_proxy",         STR_PARAM,   &outbound_proxy.s               },
189
+	{ "reload_db_subs",         INT_PARAM,   &rls_reload_db_subs             },
189 190
 	{0,							0,				0						     }
190 191
 };
191 192
 
... ...
@@ -356,10 +358,13 @@ static int mod_init(void)
356 356
 		LM_ERR("while creating new hash table\n");
357 357
 		return -1;
358 358
 	}
359
-	if(rls_restore_db_subs()< 0)
359
+	if(rls_reload_db_subs!=0)
360 360
 	{
361
-		LM_ERR("while restoring rl watchers table\n");
362
-		return -1;
361
+		if(rls_restore_db_subs()< 0)
362
+		{
363
+			LM_ERR("while restoring rl watchers table\n");
364
+			return -1;
365
+		}
363 366
 	}
364 367
 
365 368
 	if(rls_db)