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

pull/292/head
Michael Zillgith 5 years ago
parent cd663dd923
commit 0621d9ce9b

@ -698,11 +698,22 @@ IedConnection_getRCBValues(IedConnection self, IedClientError* error, const char
if (returnRcb == NULL) if (returnRcb == NULL)
returnRcb = ClientReportControlBlock_create(rcbReference); 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; return returnRcb;
} }

Loading…
Cancel
Save