From 366fa7a1bb8af7aef4dc8f5c519cdc23506bb1dd Mon Sep 17 00:00:00 2001 From: Michael Zillgith Date: Mon, 14 Dec 2015 19:02:02 +0100 Subject: [PATCH] - fixed bug for TC sDsN12: non-persitent dataset not allowed for BRCB --- src/iec61850/server/mms_mapping/reporting.c | 24 +++++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/src/iec61850/server/mms_mapping/reporting.c b/src/iec61850/server/mms_mapping/reporting.c index ab3d67e5..4b5061b4 100644 --- a/src/iec61850/server/mms_mapping/reporting.c +++ b/src/iec61850/server/mms_mapping/reporting.c @@ -503,16 +503,24 @@ updateReportDataset(MmsMapping* mapping, ReportControl* rc, MmsValue* newDatSet, if (dataSet == NULL) { + /* check if association specific data set is requested */ + + if (dataSetName[0] == '@') { - if (connection != NULL) { - MmsNamedVariableList mmsVariableList - = MmsServerConnection_getNamedVariableList(connection, dataSetName + 1); - if (mmsVariableList != NULL) - dataSet = MmsMapping_createDataSetByNamedVariableList(mapping, mmsVariableList); + if (rc->buffered == false) { /* for buffered report non-permanent datasets are not allowed */ + if (connection != NULL) { + MmsNamedVariableList mmsVariableList + = MmsServerConnection_getNamedVariableList(connection, dataSetName + 1); + + if (mmsVariableList != NULL) + dataSet = MmsMapping_createDataSetByNamedVariableList(mapping, mmsVariableList); + } } + } + /* check for VMD specific data set */ else if (dataSetName[0] == '/') { MmsNamedVariableList mmsVariableList = MmsDevice_getNamedVariableListWithName(mapping->mmsDevice, dataSetName + 1); @@ -1315,8 +1323,10 @@ Reporting_RCBWriteAccessHandler(MmsMapping* self, ReportControl* rc, char* eleme if (strcmp(elementName, "GI") == 0) { if ((rc->enabled) && (rc->clientConnection == connection)) { - if (MmsValue_getBoolean(value)) - rc->gi = true; + if (MmsValue_getBoolean(value)) { + if (rc->triggerOps & TRG_OPT_GI) + rc->gi = true; + } retVal = DATA_ACCESS_ERROR_SUCCESS; goto exit_function;