Index: modules/uri/checks.c =================================================================== RCS file: /cvsroot/ser/sip_router/modules/uri/checks.c,v retrieving revision 1.10.6.2 diff -u -r1.10.6.2 checks.c --- modules/uri/checks.c 20 Feb 2004 00:39:55 -0000 1.10.6.2 +++ modules/uri/checks.c 13 Oct 2004 15:43:55 -0000 @@ -265,6 +265,11 @@ db_key_t cols[1]; db_res_t* res; + if (db_handle == 0) { + LOG(L_ERR, "does_uri_exist(): database support not enabled\n"); + return -1; + } + if (parse_sip_msg_uri(_msg) < 0) { LOG(L_ERR, "does_uri_exist(): Error while parsing URI\n"); return -1; Index: modules/uri/uri_mod.c =================================================================== RCS file: /cvsroot/ser/sip_router/modules/uri/uri_mod.c,v retrieving revision 1.12.6.2 diff -u -r1.12.6.2 uri_mod.c --- modules/uri/uri_mod.c 20 Feb 2004 00:39:55 -0000 1.12.6.2 +++ modules/uri/uri_mod.c 13 Oct 2004 15:43:55 -0000 @@ -124,6 +124,10 @@ */ static int child_init(int rank) { + if (db_url==0) { + DBG("uri:init_child(%d): not using database\n", rank); + return 0; + } db_handle = db_init(db_url); if (!db_handle) { LOG(L_ERR, "uri:init_child(%d): Unable to connect database\n", rank); @@ -141,7 +145,15 @@ { DBG("uri - initializing\n"); - if (bind_dbmod()) { + if (strlen(db_url)==0) { + if (use_uri_table) { + LOG(L_ERR, "uri:mod_init(): database disabled, " + "\"use_uri_table\" set -> conflict\n"); + return -1; + } + DBG("uri:mod_init(): not binding to database module\n"); + db_url = 0; + } else if (bind_dbmod()) { LOG(L_ERR, "uri:mod_init(): No database module found\n"); return -1; }