summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/media/mediaManager.h2
-rw-r--r--include/server.h2
-rw-r--r--server/server.cpp4
3 files changed, 5 insertions, 3 deletions
diff --git a/include/media/mediaManager.h b/include/media/mediaManager.h
index 36987ab..17971b5 100644
--- a/include/media/mediaManager.h
+++ b/include/media/mediaManager.h
@@ -14,6 +14,8 @@
#include <list>
#include <string>
#include <stdint.h>
+#include <tntdb/connect.h>
+#include <tntdb/connection.h>
namespace upnp {
diff --git a/include/server.h b/include/server.h
index 10be258..d06b11a 100644
--- a/include/server.h
+++ b/include/server.h
@@ -69,7 +69,7 @@ public:
const cWebserver& GetWebserver() const { return *mWebserver; }
cMediaManager& GetManager() const { return *mMediaManager; }
- tntdb::Connection& GetDatabase() const { return mConnection; }
+ tntdb::Connection GetDatabase() const { return mConnection; }
const string GetDeviceUUID() const { return string("uuid:") + mCurrentConfiguration.deviceUUID; }
diff --git a/server/server.cpp b/server/server.cpp
index 61e723a..28895ac 100644
--- a/server/server.cpp
+++ b/server/server.cpp
@@ -248,8 +248,8 @@ bool cMediaServer::Initialize(){
}
- ss.str();
- ss << "sqlite:" << mCurrentConfiguration.databaseDir.empty() << "/metadata.db";
+ ss.str(string());
+ ss << "sqlite:" << mCurrentConfiguration.databaseDir << "/metadata.db";
try {
mConnection = tntdb::connect(ss.str());
} catch (const std::exception& e) {