Fixed a core dump in monitor mode in countersec.c

This commit is contained in:
2015-05-04 08:04:54 +02:00
parent b770b8c004
commit 7d535abd73

View File

@ -184,14 +184,18 @@ static int SecCtrCheckStatus(void *pData, SConnection *pCon)
fControl = v.v.doubleValue; fControl = v.v.doubleValue;
} else { } else {
node = GetHipadabaNode(self->pDes->parNode,"values"); node = GetHipadabaNode(self->pDes->parNode,"values");
assert(node != NULL); if(node != NULL) {
/* /*
This can be NULL if the counter is a HM. The values does not
exist and fControl is useless
The 1 below is only correct for PSI where only the first The 1 below is only correct for PSI where only the first
monitor can be the control monitor. Elsewhere this must be the monitor can be the control monitor. Elsewhere this must be the
control monitor channel control monitor channel
*/ */
fControl = v.v.intArray[1]; fControl = v.v.intArray[1];
} }
}
node = GetHipadabaNode(self->pDes->parNode,"preset"); node = GetHipadabaNode(self->pDes->parNode,"preset");