- GOOSE subscriber: always copy GoID and DatSet from GOOSE message; always create new MmsValue instance for GOOSE data set when subscriber is observer

pull/265/head
Michael Zillgith 5 years ago
parent 2bc47a6a6c
commit aabe20031f

@ -595,8 +595,6 @@ parseGoosePayload(GooseReceiver self, uint8_t* buffer, int apduLength)
printf("GOOSE_SUBSCRIBER: Found dataSet\n");
{
if (matchingSubscriber) {
if (matchingSubscriber->isObserver)
{
if (elementLength > 64) {
if (DEBUG_GOOSE_SUBSCRIBER)
printf("GOOSE_SUBSCRIBER: datSet too long!\n");
@ -607,7 +605,6 @@ parseGoosePayload(GooseReceiver self, uint8_t* buffer, int apduLength)
}
}
}
}
break;
case 0x83:
@ -615,8 +612,6 @@ parseGoosePayload(GooseReceiver self, uint8_t* buffer, int apduLength)
printf("GOOSE_SUBSCRIBER: Found goId\n");
{
if (matchingSubscriber) {
if (matchingSubscriber->isObserver)
{
if (elementLength > 64) {
if (DEBUG_GOOSE_SUBSCRIBER)
printf("GOOSE_SUBSCRIBER: goId too long!\n");
@ -627,7 +622,6 @@ parseGoosePayload(GooseReceiver self, uint8_t* buffer, int apduLength)
}
}
}
}
break;
case 0x84:
@ -704,6 +698,11 @@ parseGoosePayload(GooseReceiver self, uint8_t* buffer, int apduLength)
MmsValue_setUtcTime(matchingSubscriber->timestamp, 0);
}
if (matchingSubscriber->isObserver && matchingSubscriber->dataSetValues != NULL) {
MmsValue_delete(matchingSubscriber->dataSetValues);
matchingSubscriber->dataSetValues = NULL;
}
if (matchingSubscriber->dataSetValues == NULL)
matchingSubscriber->dataSetValues = parseAllDataUnknownValue(matchingSubscriber, dataSetBufferAddress, dataSetBufferLength, false);
else

Loading…
Cancel
Save