- Client: fixed - IedConnection_getRCBValues doesn't check type of server response (#283)

pull/291/head
Michael Zillgith 5 years ago
parent 4deca9a4c0
commit 3e98fdfa90

@ -698,11 +698,22 @@ IedConnection_getRCBValues(IedConnection self, IedClientError* error, const char
if (returnRcb == NULL)
returnRcb = ClientReportControlBlock_create(rcbReference);
clientReportControlBlock_updateValues(returnRcb, rcb);
if (clientReportControlBlock_updateValues(returnRcb, rcb)) {
*error = IED_ERROR_OK;
}
else {
if (DEBUG_IED_CLIENT)
printf("DEBUG_IED_CLIENT: getRCBValues returned wrong type!\n");
MmsValue_delete(rcb);
*error = IED_ERROR_TYPE_INCONSISTENT;
*error = IED_ERROR_OK;
if (updateRcb == NULL) {
ClientReportControlBlock_destroy(returnRcb);
returnRcb = NULL;
}
}
MmsValue_delete(rcb);
return returnRcb;
}

Loading…
Cancel
Save