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

This commit is contained in:
Michael Zillgith 2015-05-07 15:20:04 +02:00
parent 363d4ef5a7
commit 21d0218d0b
3 changed files with 8 additions and 6 deletions

View file

@ -26,9 +26,11 @@ sigint_handler(int signalId)
running = 0;
}
bool
static ControlHandlerResult
controlHandlerForBinaryOutput(void* parameter, MmsValue* value, bool test)
{
if (test)
return CONTROL_RESULT_FAILED;
if (MmsValue_getType(value) == MMS_BOOLEAN) {
printf("received binary control command: ");
@ -39,7 +41,7 @@ controlHandlerForBinaryOutput(void* parameter, MmsValue* value, bool test)
printf("off\n");
}
else
return false;
return CONTROL_RESULT_FAILED;
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);
}
return true;
return CONTROL_RESULT_OK;
}

View file

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

View file

@ -173,7 +173,7 @@ mmsServer_handleDeleteNamedVariableListRequest(MmsServerConnection connection,
if (variableList != NULL) {
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++;
MmsServerConnection_deleteNamedVariableList(connection, listName);
}
@ -470,7 +470,7 @@ mmsServer_handleDefineNamedVariableListRequest(
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);
createDefineNamedVariableListResponse(invokeId, response);
}