This commit is contained in:
zhouhuang 2024-12-04 14:17:28 +08:00
parent dea85ad344
commit 977a0a6499

View File

@ -823,7 +823,6 @@ BOOLEAN CHostADSBFProcess::OnPreCreate(int id)
m_turbine = new AdsDevice{m_remoteIp, AmsNetId(m_remoteNetId), AMSPORT_R0_PLC_RTS1};
readDeviceState(*m_turbine);
vLog(LOG_DEBUG, "here.\n");
if (m_bHaveFTP)
{
@ -910,6 +909,11 @@ void CHostADSBFProcess::readDeviceState(const AdsDevice& route)
{
const auto state = route.GetState();
vLog(LOG_DEBUG, "ADS state: %d devState: %d\n", (uint16_t)state.ads, (uint16_t)state.device);
if ((uint16_t)state.ads >= ADSSTATE::ADSSTATE_MAXSTATES && (uint16_t)state.device >= ADSSTATE::ADSSTATE_MAXSTATES)
{
vLog(LOG_DEBUG, "try to add a route to remote device.\n");
AddRemoteRoute(m_remoteIp, m_localNetId, m_localIp, std::string("isoftstone"), std::string("guest"), std::string("1"));
}
}
BOOLEAN CHostADSBFProcess::readFileID()