diff --git a/src/iec61850/client/client_control.c b/src/iec61850/client/client_control.c index 42ed71dd..0fa2c4d1 100644 --- a/src/iec61850/client/client_control.c +++ b/src/iec61850/client/client_control.c @@ -601,7 +601,7 @@ ControlObjectClient_operateAsync(ControlObjectClient self, IedClientError* err, *err = iedConnection_mapMmsErrorToIedError(mmsError); - if (*err != MMS_ERROR_NONE) { + if (mmsError != MMS_ERROR_NONE) { iedConnection_releaseOutstandingCall(self->connection, call); } else { @@ -829,7 +829,7 @@ ControlObjectClient_selectWithValueAsync(ControlObjectClient self, IedClientErro *err = iedConnection_mapMmsErrorToIedError(mmsError); - if (*err != MMS_ERROR_NONE) { + if (mmsError != MMS_ERROR_NONE) { iedConnection_releaseOutstandingCall(self->connection, call); } else { @@ -988,7 +988,7 @@ ControlObjectClient_selectAsync(ControlObjectClient self, IedClientError* err, C call->invokeId = MmsConnection_readVariableAsync(IedConnection_getMmsConnection(self->connection), &mmsError, domainId, itemId, internalSelectHandler, self); - if (*err != MMS_ERROR_NONE) { + if (mmsError != MMS_ERROR_NONE) { iedConnection_releaseOutstandingCall(self->connection, call); } @@ -1171,7 +1171,7 @@ ControlObjectClient_cancelAsync(ControlObjectClient self, IedClientError* err, C *err = iedConnection_mapMmsErrorToIedError(mmsError); - if (*err != MMS_ERROR_NONE) { + if (mmsError != MMS_ERROR_NONE) { iedConnection_releaseOutstandingCall(self->connection, call); } diff --git a/src/iec61850/client/client_report_control.c b/src/iec61850/client/client_report_control.c index 16a8d0cb..280aad21 100644 --- a/src/iec61850/client/client_report_control.c +++ b/src/iec61850/client/client_report_control.c @@ -1006,10 +1006,10 @@ IedConnection_setRCBValuesAsync(IedConnection self, IedClientError* error, Clien param->currentValue = LinkedList_getNext(values); param->domainId = StringUtils_copyString(domainId); - char* itemId = (char*) LinkedList_getData(param->currentItemId); + char* variableId = (char*) LinkedList_getData(param->currentItemId); MmsValue* value = (MmsValue*) LinkedList_getData(param->currentValue); - call->invokeId = MmsConnection_writeVariableAsync(self->connection, &err, domainId, itemId, value, writeVariableHandler, self); + call->invokeId = MmsConnection_writeVariableAsync(self->connection, &err, domainId, variableId, value, writeVariableHandler, self); param->originalInvokeId = call->invokeId; diff --git a/src/iec61850/client/ied_connection.c b/src/iec61850/client/ied_connection.c index 0a980b2f..48681dce 100644 --- a/src/iec61850/client/ied_connection.c +++ b/src/iec61850/client/ied_connection.c @@ -878,7 +878,6 @@ IedConnection_getVariableSpecificationAsync(IedConnection self, IedClientError* char* itemId; MmsError err; - MmsVariableSpecification* varSpec = NULL; domainId = MmsMapping_getMmsDomainFromObjectReference(dataAttributeReference, domainIdBuffer); itemId = MmsMapping_createMmsVariableNameFromObjectReference(dataAttributeReference, fc, itemIdBuffer); @@ -1917,8 +1916,6 @@ mmsConnectionFileCloseHandler (uint32_t invokeId, void* parameter, MmsError mmsE IedConnectionOutstandingCall call = iedConnection_lookupOutstandingCall(self, invokeId); if (call) { - IedConnection_GetFileAsyncHandler handler = (IedConnection_GetFileAsyncHandler) call->callback; - iedConnection_releaseOutstandingCall(self, call); } else { diff --git a/src/iec61850/server/mms_mapping/control.c b/src/iec61850/server/mms_mapping/control.c index c3f09611..a03128c5 100644 --- a/src/iec61850/server/mms_mapping/control.c +++ b/src/iec61850/server/mms_mapping/control.c @@ -402,9 +402,6 @@ ControlObject_destroy(ControlObject* self) if (self->mmsValue != NULL) MmsValue_delete(self->mmsValue); - // if (self->sbo != NULL) - // MmsValue_delete(self->sbo); - if (self->emptyString != NULL) MmsValue_delete(self->emptyString); @@ -1174,7 +1171,7 @@ Control_writeAccessControlObject(MmsMapping* self, MmsDomain* domain, char* vari } if (controlObject->ctlModel == CONTROL_MODEL_STATUS_ONLY) { - indication = DATA_ACCESS_ERROR_OBJECT_ACCESS_DENIED; + indication = DATA_ACCESS_ERROR_OBJECT_ACCESS_UNSUPPORTED; goto free_and_return; }