diff --git a/CHANGES b/CHANGES index 4d2d9f1..48fb1d1 100644 --- a/CHANGES +++ b/CHANGES @@ -1,7 +1,10 @@ -- 1.2 (2019-xx-xx) Move to CMake for building project instead of autotools Drop Vagranfile in favor of only supporting the Dockerfile -Add support for using jemalloc (http://jemalloc.net/) +Add support for building against jemalloc (http://jemalloc.net/) +Fix FreeBSD support (thanks @HierraStrunger) +Add systemd service file for ocelot (thanks @HierraStrunger) +Add site_service config option to set the service/port ocelot runs on (defaults to "http") -- 1.1 (2018-10-29) Move to spdlog (https://github.com/gabime/spdlog)to handle logging instead of cout diff --git a/src/config.cpp b/src/config.cpp index 1145f8d..43456ae 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -84,6 +84,7 @@ void config::init() { // Site communication add("site_host", "127.0.0.1"); + add("site_service", "http"); add("site_path", ""); add("site_password", "00000000000000000000000000000000"); add("report_password", "00000000000000000000000000000000"); diff --git a/src/site_comm.cpp b/src/site_comm.cpp index 2923be0..fe4cba5 100644 --- a/src/site_comm.cpp +++ b/src/site_comm.cpp @@ -21,6 +21,7 @@ site_comm::site_comm(config * conf) : t_active(false) { void site_comm::load_config(config * conf) { site_host = conf->get_str("site_host"); + site_service = conf->get_str("site_service"); site_path = conf->get_str("site_path"); site_password = conf->get_str("site_password"); readonly = conf->get_bool("readonly"); @@ -81,7 +82,7 @@ void site_comm::do_flush_tokens() boost::asio::io_service io_service; tcp::resolver resolver(io_service); - tcp::resolver::query query(site_host, "http"); + tcp::resolver::query query(site_host, site_service); tcp::resolver::iterator endpoint_iterator = resolver.resolve(query); tcp::resolver::iterator end; diff --git a/src/site_comm.h b/src/site_comm.h index b596581..b12a878 100644 --- a/src/site_comm.h +++ b/src/site_comm.h @@ -12,6 +12,7 @@ using boost::asio::ip::tcp; class site_comm { private: std::string site_host; + std::string site_service; std::string site_path; std::string site_password; std::mutex expire_queue_lock;