get a running controller in docker

This commit is contained in:
Grant Limberg 2025-09-04 11:42:53 -07:00
parent 686653509a
commit f33e706887
3 changed files with 4 additions and 33 deletions

View file

@ -655,7 +655,7 @@ void EmbeddedNetworkController::init(const Identity& signingId, Sender* sender)
throw std::runtime_error("central controller requires postgres db");
}
const char* connString = _path.substr(9).c_str();
std::string connString = _path.substr(9);
CentralDB::ListenerMode lm;
if (_cc->listenMode == "pgsql") {
@ -685,7 +685,7 @@ void EmbeddedNetworkController::init(const Identity& signingId, Sender* sender)
throw std::runtime_error("unsupported status mode");
}
_db.addDB(std::shared_ptr<CentralDB>(new CentralDB(_signingId, connString, _listenPort, lm, sm, _cc)));
_db.addDB(std::shared_ptr<CentralDB>(new CentralDB(_signingId, connString.c_str(), _listenPort, lm, sm, _cc)));
#else
#ifdef ZT_CONTROLLER_USE_LIBPQ
if ((_path.length() > 9) && (_path.substr(0, 9) == "postgres:")) {