don't define a default database URI
This commit is contained in:
+1
-2
@@ -23,7 +23,6 @@
|
||||
#include <syslog.h>
|
||||
|
||||
#define IMCV_DEBUG_LEVEL 1
|
||||
#define IMCV_DEFAULT_DATABASE_URI "sqlite:///etc/pts/config.db"
|
||||
#define IMCV_DEFAULT_POLICY_SCRIPT "ipsec _imv_policy"
|
||||
|
||||
|
||||
@@ -150,7 +149,7 @@ bool libimcv_init(bool is_imv)
|
||||
if (is_imv)
|
||||
{
|
||||
uri = lib->settings->get_str(lib->settings,
|
||||
"libimcv.database", IMCV_DEFAULT_DATABASE_URI);
|
||||
"libimcv.database", NULL);
|
||||
script = lib->settings->get_str(lib->settings,
|
||||
"libimcv.policy_script", IMCV_DEFAULT_POLICY_SCRIPT);
|
||||
if (uri)
|
||||
|
||||
@@ -303,7 +303,7 @@ METHOD(imv_database_t, get_database, database_t*,
|
||||
METHOD(imv_database_t, destroy, void,
|
||||
private_imv_database_t *this)
|
||||
{
|
||||
this->db->destroy(this->db);
|
||||
DESTROY_IF(this->db);
|
||||
this->sessions->destroy_offset(this->sessions,
|
||||
offsetof(imv_session_t, destroy));
|
||||
this->mutex->destroy(this->mutex);
|
||||
|
||||
@@ -142,9 +142,8 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
session_id = atoi(tnc_session_id);
|
||||
|
||||
/* attach database */
|
||||
uri = lib->settings->get_str(lib->settings, "imv_policy_manager.database",
|
||||
"sqlite:///etc/pts/config.db");
|
||||
/* attach IMV database */
|
||||
uri = lib->settings->get_str(lib->settings, "libimcv.database", NULL);
|
||||
db = lib->db->create(lib->db, uri);
|
||||
if (!db)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user