From 9c5ebddcfccd085a163d26cde4571aa710cb080d Mon Sep 17 00:00:00 2001 From: Artur Knopik Linux Date: Wed, 18 Dec 2024 22:48:14 +0100 Subject: [PATCH] fix build without HTTP module --- src/game.cpp | 2 ++ src/otserv.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/game.cpp b/src/game.cpp index e1f143310b..e1fa1d237e 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -117,7 +117,9 @@ void Game::setGameState(GameState_t newState) g_scheduler.stop(); g_databaseTasks.stop(); g_dispatcher.stop(); +#ifdef HTTP tfs::http::stop(); +#endif break; } diff --git a/src/otserv.cpp b/src/otserv.cpp index c497f09ee1..d9b59ac25a 100644 --- a/src/otserv.cpp +++ b/src/otserv.cpp @@ -224,9 +224,11 @@ void mainLoader(ServiceManager* services) // Legacy login protocol services->add(static_cast(getNumber(ConfigManager::LOGIN_PORT))); +#ifdef HTTP // HTTP server tfs::http::start(getString(ConfigManager::IP), getNumber(ConfigManager::HTTP_PORT), getNumber(ConfigManager::HTTP_WORKERS)); +#endif RentPeriod_t rentPeriod; std::string strRentPeriod = boost::algorithm::to_lower_copy(getString(ConfigManager::HOUSE_RENT_PERIOD));