diff options
| author | Martin Ridgers <[email protected]> | 2021-11-29 09:28:18 +0100 |
|---|---|---|
| committer | Martin Ridgers <[email protected]> | 2021-11-29 09:34:01 +0100 |
| commit | e7a3e803e499912b8ec686172f7da83bc951dad6 (patch) | |
| tree | 63bfc34e761bb00276986ee1f058dc3e745796d1 | |
| parent | Merged main (diff) | |
| download | zen-e7a3e803e499912b8ec686172f7da83bc951dad6.tar.xz zen-e7a3e803e499912b8ec686172f7da83bc951dad6.zip | |
Post-merge fixes
| -rw-r--r-- | zenserver/config.cpp | 14 | ||||
| -rw-r--r-- | zenserver/zenserver.cpp | 23 |
2 files changed, 14 insertions, 23 deletions
diff --git a/zenserver/config.cpp b/zenserver/config.cpp index a5a747150..84eb4ae75 100644 --- a/zenserver/config.cpp +++ b/zenserver/config.cpp @@ -159,14 +159,14 @@ ParseCliOptions(int argc, char* argv[], ZenServerOptions& ServerOptions) "", "tracehost", "Hostname to send the trace to", - cxxopts::value<std::string>(GlobalOptions.TraceHost)->default_value(""), + cxxopts::value<std::string>(ServerOptions.TraceHost)->default_value(""), ""); options.add_option("ue-trace", "", "tracefile", "Path to write a trace to", - cxxopts::value<std::string>(GlobalOptions.TraceFile)->default_value(""), + cxxopts::value<std::string>(ServerOptions.TraceFile)->default_value(""), ""); #endif // ZEN_WITH_TRACE @@ -336,15 +336,7 @@ ParseConfigFile(const std::filesystem::path& Path, ZenServerOptions& ServerOptio { using namespace fmt::literals; -<<<<<<< HEAD - std::filesystem::path ConfigScript = DataRoot / "zen_cfg.lua"; - zen::IoBuffer LuaScript = zen::IoBufferBuilder::MakeFromFile(ConfigScript); -||||||| b2cc49b - std::filesystem::path ConfigScript = DataRoot / "zen_cfg.lua"; - zen::IoBuffer LuaScript = zen::IoBufferBuilder::MakeFromFile(ConfigScript.native().c_str()); -======= - zen::IoBuffer LuaScript = zen::IoBufferBuilder::MakeFromFile(Path.native().c_str()); ->>>>>>> origin/main + zen::IoBuffer LuaScript = zen::IoBufferBuilder::MakeFromFile(Path); if (LuaScript) { diff --git a/zenserver/zenserver.cpp b/zenserver/zenserver.cpp index ff0c01f4f..c2d2c1d39 100644 --- a/zenserver/zenserver.cpp +++ b/zenserver/zenserver.cpp @@ -767,9 +767,8 @@ private: zen::LockFile m_LockFile; }; -ZenEntryPoint::ZenEntryPoint(ZenServerOptions& GlobalOptions, ZenServiceConfig& ServiceConfig) -: m_GlobalOptions(GlobalOptions) -, m_ServiceConfig(ServiceConfig) +ZenEntryPoint::ZenEntryPoint(ZenServerOptions& ServerOptions) +: m_ServerOptions(ServerOptions) { } @@ -781,7 +780,7 @@ ZenEntryPoint::Run() sentry_options_t* SentryOptions = sentry_options_new(); sentry_options_set_dsn(SentryOptions, "https://[email protected]/5919284"); - sentry_options_set_database_path(SentryOptions, PathToUtf8(m_GlobalOptions.DataDir / ".sentry-native").c_str()); + sentry_options_set_database_path(SentryOptions, PathToUtf8(m_ServerOptions.DataDir / ".sentry-native").c_str()); sentry_init(SentryOptions); auto _ = zen::MakeGuard([] { sentry_close(); }); @@ -915,8 +914,8 @@ ZenEntryPoint::Run() class ZenWindowsService : public WindowsService { public: - ZenWindowsService(ZenServerOptions& GlobalOptions, ZenServiceConfig& ServiceConfig) - : m_EntryPoint(GlobalOptions, ServiceConfig) + ZenWindowsService(ZenServerOptions& ServerOptions) + : m_EntryPoint(ServerOptions) { } @@ -986,13 +985,13 @@ main(int argc, char* argv[]) } #if ZEN_WITH_TRACE - if (GlobalOptions.TraceHost.size()) + if (ServerOptions.TraceHost.size()) { - TraceInit(GlobalOptions.TraceHost.c_str(), TraceType::Network); + TraceInit(ServerOptions.TraceHost.c_str(), TraceType::Network); } - else if (GlobalOptions.TraceFile.size()) + else if (ServerOptions.TraceFile.size()) { - TraceInit(GlobalOptions.TraceFile.c_str(), TraceType::File); + TraceInit(ServerOptions.TraceFile.c_str(), TraceType::File); } #endif // ZEN_WITH_TRACE @@ -1014,12 +1013,12 @@ main(int argc, char* argv[]) ZenWindowsService App(ServerOptions); return App.ServiceMain(); #else - if (GlobalOptions.InstallService || GlobalOptions.UninstallService) + if (ServerOptions.InstallService || ServerOptions.UninstallService) { throw std::runtime_error("Service mode is not supported on this platform"); } - ZenEntryPoint App(GlobalOptions, ServiceConfig); + ZenEntryPoint App(ServerOptions); return App.Run(); #endif // ZEN_PLATFORM_WINDOWS } |