removed unnessesary header includes

This commit is contained in:
loki
2021-06-08 22:23:39 +02:00
parent 877c739f1b
commit 914f329eea
4 changed files with 9 additions and 8 deletions
+7 -5
View File
@@ -2,6 +2,8 @@
// Created by TheElixZammuto on 2021-05-09. // Created by TheElixZammuto on 2021-05-09.
// TODO: Authentication, better handling of routes common to nvhttp, cleanup // TODO: Authentication, better handling of routes common to nvhttp, cleanup
#define BOOST_BIND_GLOBAL_PLACEHOLDERS
#include "process.h" #include "process.h"
#include <filesystem> #include <filesystem>
@@ -32,7 +34,7 @@ std::string read_file(std::string path);
namespace confighttp { namespace confighttp {
using namespace std::literals; using namespace std::literals;
constexpr auto PORT_HTTP = 47990; constexpr auto PORT_HTTPS = 47990;
namespace fs = std::filesystem; namespace fs = std::filesystem;
namespace pt = boost::property_tree; namespace pt = boost::property_tree;
@@ -424,14 +426,14 @@ void start(std::shared_ptr<safe::signal_t> shutdown_event) {
server.resource["^/api/apps/([0-9]+)$"]["DELETE"] = deleteApp; server.resource["^/api/apps/([0-9]+)$"]["DELETE"] = deleteApp;
server.config.reuse_address = true; server.config.reuse_address = true;
server.config.address = "0.0.0.0"s; server.config.address = "0.0.0.0"s;
server.config.port = PORT_HTTP; server.config.port = PORT_HTTPS;
try { try {
server.bind(); server.bind();
BOOST_LOG(info) << "Configuration UI available at [https://localhost:"sv << PORT_HTTP << "]"; BOOST_LOG(info) << "Configuration UI available at [https://localhost:"sv << PORT_HTTPS << "]";
} }
catch(boost::system::system_error &err) { catch(boost::system::system_error &err) {
BOOST_LOG(fatal) << "Couldn't bind http server to ports ["sv << PORT_HTTP << "]: "sv << err.what(); BOOST_LOG(fatal) << "Couldn't bind http server to ports ["sv << PORT_HTTPS << "]: "sv << err.what();
shutdown_event->raise(true); shutdown_event->raise(true);
return; return;
@@ -446,7 +448,7 @@ void start(std::shared_ptr<safe::signal_t> shutdown_event) {
return; return;
} }
BOOST_LOG(fatal) << "Couldn't start Configuration HTTP server to ports ["sv << PORT_HTTP << ", "sv << PORT_HTTP << "]: "sv << err.what(); BOOST_LOG(fatal) << "Couldn't start Configuration HTTP server to ports ["sv << PORT_HTTPS << ", "sv << PORT_HTTPS << "]: "sv << err.what();
shutdown_event->raise(true); shutdown_event->raise(true);
return; return;
} }
-1
View File
@@ -3,7 +3,6 @@
// //
#include "crypto.h" #include "crypto.h"
#include <iostream>
#include <openssl/pem.h> #include <openssl/pem.h>
namespace crypto { namespace crypto {
using big_num_t = util::safe_ptr<BIGNUM, BN_free>; using big_num_t = util::safe_ptr<BIGNUM, BN_free>;
-2
View File
@@ -6,8 +6,6 @@
#define SUNSHINE_CRYPTO_H #define SUNSHINE_CRYPTO_H
#include <array> #include <array>
#include <cassert>
#include <iomanip>
#include <openssl/evp.h> #include <openssl/evp.h>
#include <openssl/rand.h> #include <openssl/rand.h>
#include <openssl/sha.h> #include <openssl/sha.h>
+2
View File
@@ -1,3 +1,5 @@
#define BOOST_BIND_GLOBAL_PLACEHOLDERS
#include "process.h" #include "process.h"
#include <filesystem> #include <filesystem>