- GOOSE receiver ignores trailing data (like PRP tail).

pull/6/head
Michael Zillgith 10 years ago
parent 363d4ef5a7
commit 21d0218d0b

@ -26,9 +26,11 @@ sigint_handler(int signalId)
running = 0; running = 0;
} }
bool static ControlHandlerResult
controlHandlerForBinaryOutput(void* parameter, MmsValue* value, bool test) controlHandlerForBinaryOutput(void* parameter, MmsValue* value, bool test)
{ {
if (test)
return CONTROL_RESULT_FAILED;
if (MmsValue_getType(value) == MMS_BOOLEAN) { if (MmsValue_getType(value) == MMS_BOOLEAN) {
printf("received binary control command: "); printf("received binary control command: ");
@ -39,7 +41,7 @@ controlHandlerForBinaryOutput(void* parameter, MmsValue* value, bool test)
printf("off\n"); printf("off\n");
} }
else else
return false; return CONTROL_RESULT_FAILED;
uint64_t timeStamp = Hal_getTimeInMs(); uint64_t timeStamp = Hal_getTimeInMs();
@ -63,7 +65,7 @@ controlHandlerForBinaryOutput(void* parameter, MmsValue* value, bool test)
IedServer_updateAttributeValue(iedServer, IEDMODEL_GenericIO_GGIO1_SPCSO4_stVal, value); IedServer_updateAttributeValue(iedServer, IEDMODEL_GenericIO_GGIO1_SPCSO4_stVal, value);
} }
return true; return CONTROL_RESULT_OK;
} }

@ -649,7 +649,7 @@ parseGooseMessage(GooseReceiver self, int numbytes)
int apduLength = length - 8; int apduLength = length - 8;
if (numbytes != length + headerLength) { if (numbytes < length + headerLength) {
if (DEBUG) if (DEBUG)
printf("GOOSE_SUBSCRIBER: Invalid PDU size\n"); printf("GOOSE_SUBSCRIBER: Invalid PDU size\n");
return; return;

@ -173,7 +173,7 @@ mmsServer_handleDeleteNamedVariableListRequest(MmsServerConnection connection,
if (variableList != NULL) { if (variableList != NULL) {
numberMatched++; numberMatched++;
if (mmsServer_callVariableListChangedHandler(false, MMS_ASSOCIATION_SPECIFIC, NULL, listName, connection) == true) { if (mmsServer_callVariableListChangedHandler(false, MMS_ASSOCIATION_SPECIFIC, NULL, listName, connection) == MMS_ERROR_NONE) {
numberDeleted++; numberDeleted++;
MmsServerConnection_deleteNamedVariableList(connection, listName); MmsServerConnection_deleteNamedVariableList(connection, listName);
} }
@ -470,7 +470,7 @@ mmsServer_handleDefineNamedVariableListRequest(
if (namedVariableList != NULL) { if (namedVariableList != NULL) {
if (mmsServer_callVariableListChangedHandler(true, MMS_ASSOCIATION_SPECIFIC, NULL, variableListName, connection) == true) { if (mmsServer_callVariableListChangedHandler(true, MMS_ASSOCIATION_SPECIFIC, NULL, variableListName, connection) == MMS_ERROR_NONE) {
MmsServerConnection_addNamedVariableList(connection, namedVariableList); MmsServerConnection_addNamedVariableList(connection, namedVariableList);
createDefineNamedVariableListResponse(invokeId, response); createDefineNamedVariableListResponse(invokeId, response);
} }

Loading…
Cancel
Save