Hi Jayesh,
Please test the attached patch.
Regards,
Bogdan
On 08/01/2011 05:17 PM, Jayesh Nambiar wrote:
Hi,
I am using Opensips 1.7 where we can configure the db_mode param for
the b2b modules. The db_mode param works but it still expects the
db_url param defined for the b2b modules.
Is the db_url param required when db_mode is configured as 0?? If the
db_url is not defined I get the following errors and Opensips would
not start.
"CRITICAL:b2b_logic:child_init: child_init: database not bound
ERROR:core:init_mod_child: failed to initializing module b2b_logic, rank 8
ERROR:core:main_loop: init_child failed for UDP listener
ERROR:core:init_mod_child: failed to initializing module b2b_logic,
rank -1
ERROR:core:start_timer_processes: failed to send status code
If I add the db_url param it starts properly. Can someone let me know
if we can do this without defining the db_url parameter?
Thanks,
--- Jayesh
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
--
Bogdan-Andrei Iancu
OpenSIPS eBootcamp - 19th of September 2011
OpenSIPS solutions and "know-how"
Index: modules/b2b_entities/b2b_entities.c
===================================================================
--- modules/b2b_entities/b2b_entities.c (revision 8223)
+++ modules/b2b_entities/b2b_entities.c (working copy)
@@ -184,7 +184,7 @@
return -1;
}
memset(&b2be_dbf, 0, sizeof(db_func_t));
- if(db_url.s)
+ if(b2be_db_mode && db_url.s)
{
db_url.len = strlen(db_url.s);
@@ -307,7 +307,7 @@
static int child_init(int rank)
{
/* if database is needed */
- if (db_url.s)
+ if (b2be_db_mode && db_url.s)
{
if (b2be_dbf.init==0)
{
Index: modules/b2b_logic/b2b_logic.c
===================================================================
--- modules/b2b_logic/b2b_logic.c (revision 8223)
+++ modules/b2b_logic/b2b_logic.c (working copy)
@@ -235,7 +235,7 @@
return -1;
}
- if(db_url.s)
+ if(b2bl_db_mode && db_url.s)
{
db_url.len = strlen(db_url.s);
/* binding to database module */
@@ -714,6 +714,9 @@
static int child_init(int rank)
{
+ if (b2bl_db_mode==0)
+ return 0;
+
if (b2bl_dbf.init==0)
{
LM_CRIT("child_init: database not bound\n");
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users