diff --git a/src/goose/goose_receiver.c b/src/goose/goose_receiver.c index f3172a82..2fdc004a 100644 --- a/src/goose/goose_receiver.c +++ b/src/goose/goose_receiver.c @@ -662,12 +662,12 @@ parseGoosePayload(GooseReceiver self, uint8_t* buffer, int apduLength) break; - case 0x82: + case 0x82: /* DatSet */ if (DEBUG_GOOSE_SUBSCRIBER) printf("GOOSE_SUBSCRIBER: Found dataSet\n"); { if (matchingSubscriber) { - if (elementLength > 64) { + if (elementLength > 129) { if (DEBUG_GOOSE_SUBSCRIBER) printf("GOOSE_SUBSCRIBER: datSet too long!\n"); } @@ -679,12 +679,12 @@ parseGoosePayload(GooseReceiver self, uint8_t* buffer, int apduLength) } break; - case 0x83: + case 0x83: /* GoID **/ if (DEBUG_GOOSE_SUBSCRIBER) printf("GOOSE_SUBSCRIBER: Found goId\n"); { if (matchingSubscriber) { - if (elementLength > 64) { + if (elementLength > 65) { if (DEBUG_GOOSE_SUBSCRIBER) printf("GOOSE_SUBSCRIBER: goId too long!\n"); } diff --git a/src/goose/goose_receiver_internal.h b/src/goose/goose_receiver_internal.h index 45951d25..c8b6cca1 100644 --- a/src/goose/goose_receiver_internal.h +++ b/src/goose/goose_receiver_internal.h @@ -36,8 +36,8 @@ struct sGooseSubscriber { char goCBRef[130]; - char datSet[65]; - char goId[65]; + char datSet[130]; + char goId[66]; int goCBRefLen; uint32_t timeAllowedToLive; uint32_t stNum; diff --git a/src/iec61850/server/mms_mapping/control.c b/src/iec61850/server/mms_mapping/control.c index 6d36ebe8..dd2fa06f 100644 --- a/src/iec61850/server/mms_mapping/control.c +++ b/src/iec61850/server/mms_mapping/control.c @@ -2136,8 +2136,8 @@ Control_writeAccessControlObject(MmsMapping* self, MmsDomain* domain, char* vari (controlObject->synchroCheck == synchroCheck) ) == false) { - indication = DATA_ACCESS_ERROR_TYPE_INCONSISTENT; + ControlObject_sendLastApplError(controlObject, connection, "Oper", CONTROL_ERROR_NO_ERROR, ADD_CAUSE_INCONSISTENT_PARAMETERS, ctlNum, origin, true);