From a8a18475e877f0b52a2d6b5cea35be2deb1ba01d Mon Sep 17 00:00:00 2001 From: Michael Zillgith Date: Fri, 24 Apr 2015 17:27:48 +0200 Subject: [PATCH] - fixed bug #313: Server sends empty report when RCB is disabled while report is pending in bufTm --- examples/iec61850_client_example1/client_example1.c | 4 ++-- src/iec61850/server/mms_mapping/reporting.c | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/iec61850_client_example1/client_example1.c b/examples/iec61850_client_example1/client_example1.c index e993be9..1eb9444 100644 --- a/examples/iec61850_client_example1/client_example1.c +++ b/examples/iec61850_client_example1/client_example1.c @@ -85,8 +85,8 @@ int main(int argc, char** argv) { printf("RptEna = %i\n", rptEna); /* Install handler for reports */ - IedConnection_installReportHandler(con, "simpleIOGenericIO/LLN0.RP.EventsRCB01", ClientReportControlBlock_getRptId(rcb), - reportCallbackFunction, NULL); + IedConnection_installReportHandler(con, "simpleIOGenericIO/LLN0.RP.EventsRCB01", + ClientReportControlBlock_getRptId(rcb), reportCallbackFunction, NULL); /* Set trigger options and enable report */ ClientReportControlBlock_setTrgOps(rcb, TRG_OPT_DATA_UPDATE | TRG_OPT_INTEGRITY | TRG_OPT_GI); diff --git a/src/iec61850/server/mms_mapping/reporting.c b/src/iec61850/server/mms_mapping/reporting.c index daeb417..8763d9b 100644 --- a/src/iec61850/server/mms_mapping/reporting.c +++ b/src/iec61850/server/mms_mapping/reporting.c @@ -1255,6 +1255,8 @@ Reporting_RCBWriteAccessHandler(MmsMapping* self, ReportControl* rc, char* eleme MmsValue* resv = ReportControl_getRCBValue(rc, "Resv"); MmsValue_setBoolean(resv, false); + rc->triggered = false; + rc->reserved = false; }