diff --git a/examples/iec61850_client_example_files/client_example_files.c b/examples/iec61850_client_example_files/client_example_files.c index 7d369269..33c6750b 100644 --- a/examples/iec61850_client_example_files/client_example_files.c +++ b/examples/iec61850_client_example_files/client_example_files.c @@ -52,10 +52,6 @@ int main(int argc, char** argv) { IedConnection con = IedConnection_create(); - MmsConnection mmsCon = IedConnection_getMmsConnection(con); - - MmsConnection_setLocalDetail(mmsCon, 800); - IedConnection_connect(con, &error, hostname, tcpPort); if (error == IED_ERROR_OK) { diff --git a/src/iec61850/client/client_report.c b/src/iec61850/client/client_report.c index 2ded8114..1a294ca0 100644 --- a/src/iec61850/client/client_report.c +++ b/src/iec61850/client/client_report.c @@ -359,11 +359,14 @@ private_IedConnection_handleReport(IedConnection self, MmsValue* value) while (element != NULL) { ClientReport report = (ClientReport) element->data; - + char defaultRptId[129]; char* rptId = report->rptId; - if (rptId == NULL) - rptId = report->rcbReference; + if ((rptId == NULL) || (rptId && (strlen(rptId) == 0))) { + strncpy(defaultRptId, report->rcbReference, 129); + StringUtils_replace(defaultRptId, '.', '$'); + rptId = defaultRptId; + } if (strcmp(MmsValue_toString(rptIdValue), rptId) == 0) { matchingReport = report;