- code format updates

pull/521/head
Michael Zillgith 1 year ago
parent 9e005b5fe2
commit 4c92fa1f7e

@ -3,7 +3,7 @@
*
* IsoConnectionParameters abstract data type to represent the configurable parameters of the ISO protocol stack.
*
* Copyright 2013, 2014 Michael Zillgith
* Copyright 2013-2024 Michael Zillgith
*
* This file is part of libIEC61850.
*
@ -107,21 +107,23 @@ IsoConnectionParameters_setTcpParameters(IsoConnectionParameters self, const cha
void
IsoConnectionParameters_setLocalTcpParameters(IsoConnectionParameters self, const char* localIpAddress, int localTcpPort)
{
if (self) {
if (localIpAddress) {
if (self)
{
if (localIpAddress)
{
self->localIpAddress = strdup(localIpAddress);
self->localTcpPort = localTcpPort;
}
}
}
void
IsoConnectionParameters_setRemoteApTitle(IsoConnectionParameters self, const char* apTitle, int aeQualifier)
{
if (apTitle == NULL)
self->remoteApTitleLen = 0;
else {
else
{
self->remoteApTitleLen = BerEncoder_encodeOIDToBuffer(apTitle, self->remoteApTitle, 10);
self->remoteAEQualifier = aeQualifier;
}
@ -135,13 +137,13 @@ IsoConnectionParameters_setRemoteAddresses(IsoConnectionParameters self, PSelect
self->remoteTSelector = tSelector;
}
void
IsoConnectionParameters_setLocalApTitle(IsoConnectionParameters self, const char* apTitle, int aeQualifier)
{
if (apTitle == NULL)
self->localApTitleLen = 0;
else {
else
{
self->localApTitleLen = BerEncoder_encodeOIDToBuffer(apTitle, self->localApTitle, 10);
self->localAEQualifier = aeQualifier;
}

Loading…
Cancel
Save