From 1b9c79b963351ce624c754e74b29f720bf3e4960 Mon Sep 17 00:00:00 2001 From: Benjamin Reis Date: Thu, 1 Feb 2018 15:54:32 +0100 Subject: [PATCH] get correct database path in mainDb tester --- tester/main-db-tester.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/tester/main-db-tester.cpp b/tester/main-db-tester.cpp index 1ad4c2596..f27b60e26 100644 --- a/tester/main-db-tester.cpp +++ b/tester/main-db-tester.cpp @@ -35,18 +35,13 @@ using namespace LinphonePrivate; // ----------------------------------------------------------------------------- -static const string getDatabasePath () { - static const string path = string(bc_tester_get_resource_dir_prefix()) + "db/linphone.db"; - return path; -} - -// ----------------------------------------------------------------------------- - class MainDbProvider { public: MainDbProvider () { mCoreManager = linphone_core_manager_create("marie_rc"); - linphone_config_set_string(linphone_core_get_config(mCoreManager->lc), "storage", "uri", getDatabasePath().c_str()); + char *dbPath = bc_tester_res("db/linphone.db"); + linphone_config_set_string(linphone_core_get_config(mCoreManager->lc), "storage", "uri", dbPath); + bctbx_free(dbPath); linphone_core_manager_start(mCoreManager, false); }