diff --git a/src/iec61850/server/mms_mapping/reporting.c b/src/iec61850/server/mms_mapping/reporting.c index d473391c..da6a5e67 100644 --- a/src/iec61850/server/mms_mapping/reporting.c +++ b/src/iec61850/server/mms_mapping/reporting.c @@ -954,11 +954,18 @@ refreshIntegrityPeriod(ReportControl* rc) #endif if (rc->buffered == false) { - if (rc->server->syncIntegrityReportTimes) { - rc->nextIntgReportTime = getNextRoundedStartTime(Hal_getTimeInMs(), rc->intgPd); - } - else { - rc->nextIntgReportTime = Hal_getTimeInMs() + rc->intgPd; + + if (rc->triggerOps & TRG_OPT_INTEGRITY) { + + if (rc->intgPd > 0) { + + if (rc->server->syncIntegrityReportTimes) { + rc->nextIntgReportTime = getNextRoundedStartTime(Hal_getTimeInMs(), rc->intgPd); + } + else { + rc->nextIntgReportTime = Hal_getTimeInMs() + rc->intgPd; + } + } } } } @@ -2145,11 +2152,17 @@ Reporting_RCBWriteAccessHandler(MmsMapping* self, ReportControl* rc, char* eleme if (rc->buffered) { - if (rc->server->syncIntegrityReportTimes) { - rc->nextIntgReportTime = getNextRoundedStartTime(Hal_getTimeInMs(), rc->intgPd); - } - else { - rc->nextIntgReportTime = 0; + if (rc->triggerOps & TRG_OPT_INTEGRITY) { + + if (rc->intgPd > 0) { + + if (rc->server->syncIntegrityReportTimes) { + rc->nextIntgReportTime = getNextRoundedStartTime(Hal_getTimeInMs(), rc->intgPd); + } + else { + rc->nextIntgReportTime = 0; + } + } } purgeBuf(rc);