diff --git a/userspace/falco/app/actions/start_grpc_server.cpp b/userspace/falco/app/actions/start_grpc_server.cpp index 3a7fa714..43710348 100644 --- a/userspace/falco/app/actions/start_grpc_server.cpp +++ b/userspace/falco/app/actions/start_grpc_server.cpp @@ -17,14 +17,15 @@ limitations under the License. #include "actions.h" #ifndef MINIMAL_BUILD - #include "grpc_server.h" +#endif using namespace falco::app; using namespace falco::app::actions; falco::app::run_result falco::app::actions::start_grpc_server(falco::app::state& s) { +#ifndef MINIMAL_BUILD // gRPC server if(s.config->m_grpc_enabled) { @@ -43,17 +44,19 @@ falco::app::run_result falco::app::actions::start_grpc_server(falco::app::state& s.grpc_server.run(); }); } +#endif return run_result::ok(); } falco::app::run_result falco::app::actions::stop_grpc_server(falco::app::state& s) { +#ifndef MINIMAL_BUILD if(s.grpc_server_thread.joinable()) { s.grpc_server.shutdown(); s.grpc_server_thread.join(); } - +#endif return run_result::ok(); } diff --git a/userspace/falco/app/actions/start_webserver.cpp b/userspace/falco/app/actions/start_webserver.cpp index 8cb32a1c..d5f016f1 100644 --- a/userspace/falco/app/actions/start_webserver.cpp +++ b/userspace/falco/app/actions/start_webserver.cpp @@ -17,14 +17,15 @@ limitations under the License. #include "actions.h" #ifndef MINIMAL_BUILD - #include "webserver.h" +#endif using namespace falco::app; using namespace falco::app::actions; falco::app::run_result falco::app::actions::start_webserver(falco::app::state& s) { +#ifndef MINIMAL_BUILD if(!s.is_capture_mode() && s.config->m_webserver_enabled) { std::string ssl_option = (s.config->m_webserver_ssl_enabled ? " (SSL)" : ""); @@ -42,15 +43,18 @@ falco::app::run_result falco::app::actions::start_webserver(falco::app::state& s s.config->m_webserver_ssl_certificate, s.config->m_webserver_ssl_enabled); } +#endif return run_result::ok(); } falco::app::run_result falco::app::actions::stop_webserver(falco::app::state& s) { +#ifndef MINIMAL_BUILD if(!s.is_capture_mode()) { s.webserver.stop(); } +#endif return run_result::ok(); }