This commit is contained in:
Cussrro 2024-12-19 17:33:06 +08:00
parent c8f1e4346f
commit fb39a1c5d5
11 changed files with 158 additions and 51 deletions

View file

@ -104,6 +104,11 @@ bool LoadConfig(int argc, TCHAR * argv[])
swprintf(wszData, L"Log%dDBName", i + 1);
g_IniFile.GetValue(L"LogDB", wszData, g_Config.LogDB[i].wszDBName);
}
g_IniFile.GetValue(L"ServerManagerEx", L"sid", &g_Config.nManagedID);
g_IniFile.GetValue(L"ServerManagerEx", L"ip", wszBuf);
WideCharToMultiByte(CP_ACP, NULL, wszBuf, -1, g_Config.ServiceInfo.szIP, sizeof(g_Config.ServiceInfo.szIP), NULL, NULL);
g_IniFile.GetValue(L"ServerManagerEx", L"port", &g_Config.ServiceInfo.nPort);
}
if (g_Config.nThreadMax > THREADMAX) g_Config.nThreadMax = THREADMAX;
@ -131,7 +136,7 @@ bool InitApp(int argc, TCHAR * argv[])
#if defined(_DEBUG) && defined(_WORK)
if ( CheckWorkingFolder(L"out") == false )
{
wprintf(L"작업 디렉토리를 설정해주세요!!!! setworking folder error " );
wprintf(L"累诀 叼泛配府甫 汲沥秦林技夸!!!! setworking folder error " );
}
#endif
@ -211,7 +216,8 @@ bool InitApp(int argc, TCHAR * argv[])
}
g_pIocpManager->CreateUpdateThread();
if (argc > 1 && g_Config.nManagedID > 0)
// TODO(Cussrro): 优化配置项启动无法连接服务管理器
if (g_Config.nManagedID > 0)
{
g_pIocpManager->CreateThread();
g_pServiceConnection = new CDNServiceConnection(g_Config.nManagedID);
@ -268,8 +274,8 @@ int _tmain(int argc, TCHAR* argv[])
setlocale(LC_ALL, "Korean");
#endif
// 예외 처리자 준비
DWORD dwRetVal = CExceptionReport::GetInstancePtr()->Open(_T(".\\"), TRUE, TRUE); // Release 모드 컴파일 시 C4744 경고가 발생하여 Singleton 구현 변경, CExceptionReport::GetInstancePtr() 을 inline 화 하지 않음 (참고 : http://msdn.microsoft.com/ko-kr/library/a7za416f.aspx)
// 抗寇 贸府磊 霖厚
DWORD dwRetVal = CExceptionReport::GetInstancePtr()->Open(_T(".\\"), TRUE, TRUE); // Release 葛靛 哪颇老 矫 C4744 版绊啊 惯积窍咯 Singleton 备泅 函版, CExceptionReport::GetInstancePtr() 阑 inline 拳 窍瘤 臼澜 (曼绊 : http://msdn.microsoft.com/ko-kr/library/a7za416f.aspx)
if (NOERROR != dwRetVal) {
DWORD dwErrNo = ::GetLastError();
DN_RETURN(dwErrNo);
@ -280,7 +286,7 @@ int _tmain(int argc, TCHAR* argv[])
return 0;
}
wprintf(L"exit 명령을 치면 종료\r\n");
wprintf(L"exit 疙飞阑 摹搁 辆丰\r\n");
char szCmd[256] = {0};
while (1)