diff options
author | 2022-09-23 14:22:24 +1000 | |
---|---|---|
committer | 2022-09-23 14:22:24 +1000 | |
commit | f3e4c036fa07f275b9d591f91e5d666a7582fede (patch) | |
tree | 447c5d827058bf4929daaf483345c14b48b5114e | |
parent | 36b4127cc85a4c015cb3cb58dcb170d98f667af5 (diff) |
Removed insecure web server.
-rw-r--r-- | src/emu/emufwd.h | 2 | ||||
-rw-r--r-- | src/emu/emuopts.cpp | 8 | ||||
-rw-r--r-- | src/emu/emuopts.h | 2 | ||||
-rw-r--r-- | src/emu/machine.cpp | 10 | ||||
-rw-r--r-- | src/emu/machine.h | 2 | ||||
-rw-r--r-- | src/emu/main.cpp | 9 | ||||
-rw-r--r-- | src/emu/main.h | 6 | ||||
-rw-r--r-- | src/frontend/mame/clifront.cpp | 2 | ||||
-rw-r--r-- | src/osd/winui/winui.cpp | 2 |
9 files changed, 22 insertions, 21 deletions
diff --git a/src/emu/emufwd.h b/src/emu/emufwd.h index 6d0528015c4..4148c28feff 100644 --- a/src/emu/emufwd.h +++ b/src/emu/emufwd.h @@ -156,7 +156,7 @@ class emu_options; class emu_file; // declared in http.h -class http_manager; +//class http_manager; // declared in gamedrv.h class game_driver; diff --git a/src/emu/emuopts.cpp b/src/emu/emuopts.cpp index fc00b6bb9e4..ec37fea1ceb 100644 --- a/src/emu/emuopts.cpp +++ b/src/emu/emuopts.cpp @@ -217,10 +217,10 @@ const options_entry emu_options::s_option_entries[] = { OPTION_PLUGIN, nullptr, core_options::option_type::STRING, "list of plugins to enable" }, { OPTION_NO_PLUGIN, nullptr, core_options::option_type::STRING, "list of plugins to disable" }, - { nullptr, nullptr, core_options::option_type::HEADER, "HTTP SERVER OPTIONS" }, - { OPTION_HTTP, "0", core_options::option_type::BOOLEAN, "enable HTTP server" }, - { OPTION_HTTP_PORT, "8080", core_options::option_type::INTEGER, "HTTP server port" }, - { OPTION_HTTP_ROOT, "web", core_options::option_type::STRING, "HTTP server document root" }, +// { nullptr, nullptr, core_options::option_type::HEADER, "HTTP SERVER OPTIONS" }, +// { OPTION_HTTP, "0", core_options::option_type::BOOLEAN, "enable HTTP server" }, +// { OPTION_HTTP_PORT, "8080", core_options::option_type::INTEGER, "HTTP server port" }, +// { OPTION_HTTP_ROOT, "web", core_options::option_type::STRING, "HTTP server document root" }, { nullptr } }; diff --git a/src/emu/emuopts.h b/src/emu/emuopts.h index 296e2e46590..5c22770cca3 100644 --- a/src/emu/emuopts.h +++ b/src/emu/emuopts.h @@ -480,7 +480,7 @@ public: const char *language() const { return value(OPTION_LANGUAGE); } // Web server specific options - bool http() const { return bool_value(OPTION_HTTP); } + bool http() const { return 0; } //bool_value(OPTION_HTTP); } short http_port() const { return int_value(OPTION_HTTP_PORT); } const char *http_root() const { return value(OPTION_HTTP_ROOT); } diff --git a/src/emu/machine.cpp b/src/emu/machine.cpp index e629dc1cf84..cb540e3a4a1 100644 --- a/src/emu/machine.cpp +++ b/src/emu/machine.cpp @@ -252,7 +252,7 @@ int running_machine::run(bool quiet) // use try/catch for deep error recovery try { - m_manager.http()->clear(); + //m_manager.http()->clear(); // move to the init phase m_current_phase = machine_phase::INIT; @@ -312,7 +312,7 @@ int running_machine::run(bool quiet) if (m_saveload_schedule != saveload_schedule::NONE) handle_saveload(); - export_http_api(); + //export_http_api(); #if defined(__EMSCRIPTEN__) // break out to our async javascript loop and halt @@ -337,7 +337,7 @@ int running_machine::run(bool quiet) g_profiler.stop(); } - m_manager.http()->clear(); + //m_manager.http()->clear(); // and out via the exit phase m_current_phase = machine_phase::EXIT; @@ -1205,7 +1205,7 @@ running_machine::logerror_callback_item::logerror_callback_item(logerror_callbac : m_func(std::move(func)) { } - +#if 0 void running_machine::export_http_api() { if (m_manager.http()->is_active()) { @@ -1233,7 +1233,7 @@ void running_machine::export_http_api() }); } } - +#endif //************************************************************************** // SYSTEM TIME //************************************************************************** diff --git a/src/emu/machine.h b/src/emu/machine.h index a49c5f1dbf9..7cadc912a2e 100644 --- a/src/emu/machine.h +++ b/src/emu/machine.h @@ -174,7 +174,7 @@ public: void add_logerror_callback(logerror_callback callback); void set_ui_active(bool active) { m_ui_active = active; } void debug_break(); - void export_http_api(); + //void export_http_api(); // TODO: Do saves and loads still require scheduling? void immediate_save(std::string_view filename); diff --git a/src/emu/main.cpp b/src/emu/main.cpp index 6ce109ae1ef..8d2ed5778f9 100644 --- a/src/emu/main.cpp +++ b/src/emu/main.cpp @@ -13,7 +13,7 @@ #include "http.h" machine_manager::machine_manager(emu_options& options, osd_interface& osd) - : m_osd(osd), + : m_osd(osd), m_options(options), m_machine(nullptr) { @@ -22,14 +22,15 @@ machine_manager::machine_manager(emu_options& options, osd_interface& osd) machine_manager::~machine_manager() { } - +#if 0 void machine_manager::start_http_server() { m_http = std::make_unique<http_manager>(options().http(), options().http_port(), options().http_root()); } - http_manager *machine_manager::http() { - return m_http.get(); + return m_http.get(); } +#endif + diff --git a/src/emu/main.h b/src/emu/main.h index 89399e21690..234763051b2 100644 --- a/src/emu/main.h +++ b/src/emu/main.h @@ -88,14 +88,14 @@ public: virtual void update_machine() { } - http_manager *http(); - void start_http_server(); + //http_manager *http(); + //void start_http_server(); protected: osd_interface & m_osd; // reference to OSD system emu_options & m_options; // reference to options running_machine * m_machine; - std::unique_ptr<http_manager> m_http; + //std::unique_ptr<http_manager> m_http; }; #endif // MAME_EMU_MAIN_H diff --git a/src/frontend/mame/clifront.cpp b/src/frontend/mame/clifront.cpp index cef0cddf721..926c43623bd 100644 --- a/src/frontend/mame/clifront.cpp +++ b/src/frontend/mame/clifront.cpp @@ -258,7 +258,7 @@ void cli_frontend::start_execution(mame_machine_manager *manager, const std::vec // otherwise, check for a valid system load_translation(m_options); - manager->start_http_server(); + //manager->start_http_server(); manager->start_luaengine(); diff --git a/src/osd/winui/winui.cpp b/src/osd/winui/winui.cpp index 0a2914d14a3..be7de755cba 100644 --- a/src/osd/winui/winui.cpp +++ b/src/osd/winui/winui.cpp @@ -1004,7 +1004,7 @@ static DWORD RunMAME(int nGameIndex, const play_options *playopts) std::ostringstream option_errors; mame_options::parse_standard_inis(global_opts, option_errors); load_translation(global_opts); - manager->start_http_server(); + //manager->start_http_server(); manager->start_luaengine(); time_t start, end; time(&start); |