diff --git a/pyiec61850/CMakeLists.txt b/pyiec61850/CMakeLists.txt index 156f90f2..316a9391 100644 --- a/pyiec61850/CMakeLists.txt +++ b/pyiec61850/CMakeLists.txt @@ -16,7 +16,7 @@ else() set(LIBS iec61850-shared) endif() -if(${SWIG_VERSION} VERSION_LESS 3.0) +if(${CMAKE_VERSION} VERSION_LESS 3.8) swig_add_module(iec61850 python iec61850.i) else() swig_add_library(iec61850 diff --git a/src/mms/iso_client/iso_client_connection.c b/src/mms/iso_client/iso_client_connection.c index e78b8f5d..dbe320bf 100644 --- a/src/mms/iso_client/iso_client_connection.c +++ b/src/mms/iso_client/iso_client_connection.c @@ -199,10 +199,10 @@ sendConnectionRequestMessage(IsoClientConnection self) CotpConnection_init(self->cotpConnection, self->socket, self->receiveBuffer, self->cotpReadBuffer, self->cotpWriteBuffer); #if (CONFIG_MMS_SUPPORT_TLS == 1) - if (params->tlsConfiguration) { + if (self->parameters->tlsConfiguration) { /* create TLSSocket and start TLS authentication */ - TLSSocket tlsSocket = TLSSocket_create(self->socket, params->tlsConfiguration, false); + TLSSocket tlsSocket = TLSSocket_create(self->socket, self->parameters->tlsConfiguration, false); if (tlsSocket) self->cotpConnection->tlsSocket = tlsSocket; @@ -211,7 +211,7 @@ sendConnectionRequestMessage(IsoClientConnection self) if (DEBUG_ISO_CLIENT) printf("TLS handshake failed!\n"); - goto returnError; + return false; } } #endif /* (CONFIG_MMS_SUPPORT_TLS == 1) */ diff --git a/src/mms/iso_mms/client/mms_client_write.c b/src/mms/iso_mms/client/mms_client_write.c index 248ca613..de80fdc9 100644 --- a/src/mms/iso_mms/client/mms_client_write.c +++ b/src/mms/iso_mms/client/mms_client_write.c @@ -567,7 +567,6 @@ mmsClient_createWriteRequestAlternateAccessSingleIndexComponent(uint32_t invokeI (asn_app_consume_bytes_f*) mmsClient_write_out, (void*) writeBuffer); /* Free ASN structure */ - // mmsClient_deleteAlternateAccessIndexComponent(variableIdentifier->alternateAccess); mmsClient_deleteAlternateAccess(variableIdentifier->alternateAccess); request->variableAccessSpecification.choice.listOfVariable.list.count = 0;