Fix: OnOnlineUpdate caused by commit 2fb77d5

This commit is contained in:
shaun
2026-01-21 15:25:49 +01:00
parent 0eba54756b
commit 43e752cf9c
6 changed files with 7 additions and 2 deletions

View File

@@ -1822,7 +1822,7 @@ void CMy2015RemoteDlg::OnOnlineUpdate()
dst->SetAdminId(GetMasterHash().c_str());
memcpy(dst->szFlag, GetMasterId().c_str(), 16);
strcpy_s(dst->szServerIP, THIS_CFG.GetStr("settings", "master", "127.0.0.1").c_str());
strcpy_s(dst->szPort, THIS_CFG.GetStr("settings", "port", "6543").c_str());
strcpy_s(dst->szPort, THIS_CFG.GetStr("settings", "ghost", "6543").c_str());
dst->Encrypt();
dst->iType = dlg.m_nSelected ? CLIENT_TYPE_ONE : CLIENT_TYPE_MEMDLL;
dst->iStartup = dlg.m_nSelected ? Startup_GhostMsc : Startup_TestRunMsc;
@@ -1846,6 +1846,11 @@ void CMy2015RemoteDlg::OnOnlineUpdate()
memcpy(buffer + 1, &fileSize, 8);
memcpy(buffer + 9, buf->c_str() + 6, fileSize);
}
else if (clientType == "SC" || clientType == "MDLL") {
fileSize = 0;
buffer = new BYTE[fileSize + 9]();
buffer[0] = COMMAND_UPDATE;
}
if (buffer) {
SendSelectedCommand((PBYTE)buffer, 9 + fileSize);