初步修改
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
#include "Local_Server/State_Report/State_Report.h"
|
||||
#include "Local_Server/server/Global.h"
|
||||
#include "Local_Server/server/io_coro.h"
|
||||
// ./server ./config.json
|
||||
// ./server ./config
|
||||
#ifdef __linux__
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
@@ -53,11 +53,11 @@ struct Catch_Memory {
|
||||
int psc_main(int argc, char* argv[]) {
|
||||
std::cout << "wyc_main" << std::endl;
|
||||
if (argc >= 2) {
|
||||
std::string config_path = argv[1];
|
||||
if (config_path.at(0) == '@') {
|
||||
config_path.replace(0, 1, get_exe_dir());
|
||||
std::string config_directory = argv[1];
|
||||
if (config_directory.at(0) == '@') {
|
||||
config_directory.replace(0, 1, get_exe_dir());
|
||||
}
|
||||
::default_config_path = config_path;
|
||||
::default_config_directory = config_directory;
|
||||
}
|
||||
// std::cout << get_stack_trace() << std::endl;
|
||||
init_signal_config({SIGINT, SIGTERM},
|
||||
@@ -134,9 +134,9 @@ int psc_main(int argc, char* argv[]) {
|
||||
}
|
||||
});
|
||||
// manager.test_and_start_thread("io_coro 协程线程", io_coro);
|
||||
static int t = Global::instance()->mode_acs.read_milliseconds;
|
||||
static int t = static_cast<int>(Global::instance()->mode_acs.settings.member<&Mode_ACS_Config_Data::read_milliseconds>().snapshot());
|
||||
g->dsp_config.init_env();
|
||||
bool enable = g->mlat.enable;
|
||||
bool enable = g->mlat.settings.member<&MLAT_Config_Data::enable>().snapshot();
|
||||
auto coro = Coro::instance();
|
||||
coro->start();
|
||||
// Catch_Memory cm;
|
||||
@@ -148,7 +148,7 @@ int psc_main(int argc, char* argv[]) {
|
||||
g->mlat.refresh();
|
||||
}
|
||||
#ifdef __linux__
|
||||
if (g->mode_acs.monitor_msg_live)
|
||||
if (g->mode_acs.settings.member<&Mode_ACS_Config_Data::monitor_msg_live>().snapshot())
|
||||
malloc_trim(0);
|
||||
#endif
|
||||
std::this_thread::sleep_for(std::chrono::seconds(3));
|
||||
|
||||
Reference in New Issue
Block a user