Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Won't Do
-
1.1.0
-
None
Description
In debugging for another BUG, ran across this code. It will be a problem if as an example PM2 is removed from the configuration on a PM1 - PM3 system.
Code just gets the number of configured PMs, then tried to communicate to them in a loop that starts at 1 and goes to number-of-pms.
void WEClients::Setup()
{
makeBusy(true);
joblist::ResourceManager *rm = joblist::ResourceManager::instance();
oam::Oam oam;
string ipAddress;
ModuleTypeConfig moduletypeconfig;
try
catch (...)
{ writeToLog(__FILE__, __LINE__, "oam.getSystemConfig error, unknown exception", LOG_TYPE_ERROR); throw runtime_error("Setup failed"); } uint32_t pmCountConfig = moduletypeconfig.ModuleCount;
pmCount = 0;
int moduleID = 1;
char buff[32];
ByteStream bs, bsRead;
if (fPrgmID == DDLPROC)
else if (fPrgmID == DMLPROC)
{ bs << (ByteStream::byte) WE_SVR_DML_KEEPALIVE; bs << (ByteStream::octbyte) moduleID; }else if (fPrgmID == SPLITTER)
{ bs << (ByteStream::byte) WE_CLT_SRV_KEEPALIVE; }else if (fPrgmID == BATCHINSERTPROC)
{ bs << (ByteStream::byte) WE_SVR_BATCH_KEEPALIVE; bs << (ByteStream::octbyte) moduleID; }for (unsigned i = 0; i < pmCountConfig; i++) {