File transfer server now respects the port and host settings set via the config.yml
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
//
|
||||
|
||||
#include <files/FileServer.h>
|
||||
#include <log/LogUtils.h>
|
||||
#include <files/Config.h>
|
||||
|
||||
#include "./client/ConnectedClient.h"
|
||||
@@ -15,15 +14,10 @@ using namespace ts::server::file;
|
||||
FileServerHandler::FileServerHandler(ts::server::InstanceHandler *instance) : instance_{instance} {}
|
||||
|
||||
bool FileServerHandler::initialize(std::string &error) {
|
||||
/*
|
||||
* FIXME: Ports etc!
|
||||
*
|
||||
auto bindings_string = this->properties()[property::SERVERINSTANCE_FILETRANSFER_HOST].as<string>();
|
||||
auto port = this->properties()[property::SERVERINSTANCE_FILETRANSFER_PORT].as<uint16_t>();
|
||||
*/
|
||||
if(!file::initialize(error))
|
||||
if(!file::initialize(error, serverInstance->properties()[property::SERVERINSTANCE_FILETRANSFER_HOST].as<std::string>(), serverInstance->properties()[property::SERVERINSTANCE_FILETRANSFER_PORT].as<uint16_t>()))
|
||||
return false;
|
||||
|
||||
|
||||
file::config::ssl_option_supplier = [&]{
|
||||
return this->instance_->sslManager()->web_ssl_options();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user