From 56ce4a19b112aa2a13beaa7c197e6ce4e5477519 Mon Sep 17 00:00:00 2001 From: Benjamin Reis Date: Tue, 24 Oct 2017 16:51:08 +0200 Subject: [PATCH] add db connection on core creation --- src/core/core.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core/core.cpp b/src/core/core.cpp index 65832c42f..820f7ed05 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -18,6 +18,7 @@ */ #include +#include #include "chat/chat-room/basic-chat-room.h" #include "core-p.h" @@ -47,8 +48,9 @@ Core::Core (LinphoneCore *cCore) : Object(*new CorePrivate) { : MainDb::Sqlite3; d->mainDb.connect(backend, uri); } else { - string path = getDataPath(); - //d->mainDb.connect(MainDb::Sqlite3, linphone_factory_get_writable_dir()/linphone.db); + stringstream path; + path << getDataPath() << "/linphone.db"; + d->mainDb.connect(MainDb::Sqlite3, path.str()); } }