summaryrefslogtreecommitdiff
path: root/controller/EmbeddedNetworkController.cpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2019-08-07 11:23:48 -0500
committerAdam Ierymenko <adam.ierymenko@gmail.com>2019-08-07 11:23:48 -0500
commitf7e8d8f1ddc142c5f788fb941c096ac2fea8cb44 (patch)
tree80cce7a3d97551413823ac910b761a03ab3d1f1b /controller/EmbeddedNetworkController.cpp
parent3ed8e46782aec83991aa8dbe4936ab36beca2501 (diff)
downloadinfinitytier-f7e8d8f1ddc142c5f788fb941c096ac2fea8cb44.tar.gz
infinitytier-f7e8d8f1ddc142c5f788fb941c096ac2fea8cb44.zip
Fix LFDB path issue when using with Postgress in DBMirrorSet config
Diffstat (limited to 'controller/EmbeddedNetworkController.cpp')
-rw-r--r--controller/EmbeddedNetworkController.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/controller/EmbeddedNetworkController.cpp b/controller/EmbeddedNetworkController.cpp
index 893c0239..08d31bee 100644
--- a/controller/EmbeddedNetworkController.cpp
+++ b/controller/EmbeddedNetworkController.cpp
@@ -469,10 +469,11 @@ static bool _parseRule(json &r,ZT_VirtualNetworkRule &rule)
} // anonymous namespace
-EmbeddedNetworkController::EmbeddedNetworkController(Node *node,const char *dbPath, int listenPort, MQConfig *mqc) :
+EmbeddedNetworkController::EmbeddedNetworkController(Node *node,const char *ztPath,const char *dbPath, int listenPort, MQConfig *mqc) :
_startTime(OSUtils::now()),
_listenPort(listenPort),
_node(node),
+ _ztPath(ztPath),
_path(dbPath),
_sender((NetworkController::Sender *)0),
_db(this),
@@ -506,7 +507,7 @@ void EmbeddedNetworkController::init(const Identity &signingId,Sender *sender)
#endif
std::string lfJSON;
- OSUtils::readFile((_path + ZT_PATH_SEPARATOR_S ".." ZT_PATH_SEPARATOR_S "local.conf").c_str(),lfJSON);
+ OSUtils::readFile((_ztPath + ZT_PATH_SEPARATOR_S "local.conf").c_str(),lfJSON);
if (lfJSON.length() > 0) {
nlohmann::json lfConfig(OSUtils::jsonParse(lfJSON));
nlohmann::json &settings = lfConfig["settings"];