Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge fixes from Develop/main374 into ECC branch #2844

Closed
wants to merge 14 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .azurepipelines/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ jobs:
- task: NuGetToolInstaller@1
inputs:
versionSpec: '>=5.8.x'
- task: UseDotNet@2
displayName: 'Install .NET 9.0'
inputs:
packageType: 'sdk'
version: '9.0.x'
- task: PowerShell@2
displayName: Versioning
inputs:
Expand Down
4 changes: 2 additions & 2 deletions .azurepipelines/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ jobs:
value: '.azurepipelines/signlist${{parameters.config}}.txt'
steps:
- task: UseDotNet@2
displayName: 'Install .NET 8.0'
displayName: 'Install .NET 9.0'
inputs:
packageType: 'sdk'
version: '8.0.x'
version: '9.0.x'
includePreviewVersions: false
- task: DownloadSecureFile@1
name: strongnamefile
Expand Down
10 changes: 10 additions & 0 deletions .azurepipelines/signlistDebug.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,56 +4,66 @@ Stack\Opc.Ua.Core\bin\Debug\net472\Opc.Ua.Core.dll
Stack\Opc.Ua.Core\bin\Debug\net48\Opc.Ua.Core.dll
Stack\Opc.Ua.Core\bin\Debug\net6.0\Opc.Ua.Core.dll
Stack\Opc.Ua.Core\bin\Debug\net8.0\Opc.Ua.Core.dll
Stack\Opc.Ua.Core\bin\Debug\net9.0\Opc.Ua.Core.dll
Stack\Opc.Ua.Bindings.Https\bin\Debug\netstandard2.0\Opc.Ua.Bindings.Https.dll
Stack\Opc.Ua.Bindings.Https\bin\Debug\netstandard2.1\Opc.Ua.Bindings.Https.dll
Stack\Opc.Ua.Bindings.Https\bin\Debug\net472\Opc.Ua.Bindings.Https.dll
Stack\Opc.Ua.Bindings.Https\bin\Debug\net48\Opc.Ua.Bindings.Https.dll
Stack\Opc.Ua.Bindings.Https\bin\Debug\net6.0\Opc.Ua.Bindings.Https.dll
Stack\Opc.Ua.Bindings.Https\bin\Debug\net8.0\Opc.Ua.Bindings.Https.dll
Stack\Opc.Ua.Bindings.Https\bin\Debug\net9.0\Opc.Ua.Bindings.Https.dll
Libraries\Opc.Ua.Server\bin\Debug\netstandard2.0\Opc.Ua.Server.dll
Libraries\Opc.Ua.Server\bin\Debug\netstandard2.1\Opc.Ua.Server.dll
Libraries\Opc.Ua.Server\bin\Debug\net472\Opc.Ua.Server.dll
Libraries\Opc.Ua.Server\bin\Debug\net48\Opc.Ua.Server.dll
Libraries\Opc.Ua.Server\bin\Debug\net6.0\Opc.Ua.Server.dll
Libraries\Opc.Ua.Server\bin\Debug\net8.0\Opc.Ua.Server.dll
Libraries\Opc.Ua.Server\bin\Debug\net9.0\Opc.Ua.Server.dll
Libraries\Opc.Ua.Client\bin\Debug\netstandard2.0\Opc.Ua.Client.dll
Libraries\Opc.Ua.Client\bin\Debug\netstandard2.1\Opc.Ua.Client.dll
Libraries\Opc.Ua.Client\bin\Debug\net472\Opc.Ua.Client.dll
Libraries\Opc.Ua.Client\bin\Debug\net48\Opc.Ua.Client.dll
Libraries\Opc.Ua.Client\bin\Debug\net6.0\Opc.Ua.Client.dll
Libraries\Opc.Ua.Client\bin\Debug\net8.0\Opc.Ua.Client.dll
Libraries\Opc.Ua.Client\bin\Debug\net9.0\Opc.Ua.Client.dll
Libraries\Opc.Ua.Client.ComplexTypes\bin\Debug\netstandard2.1\Opc.Ua.Client.ComplexTypes.dll
Libraries\Opc.Ua.Client.ComplexTypes\bin\Debug\net462\Opc.Ua.Client.ComplexTypes.dll
Libraries\Opc.Ua.Client.ComplexTypes\bin\Debug\net472\Opc.Ua.Client.ComplexTypes.dll
Libraries\Opc.Ua.Client.ComplexTypes\bin\Debug\net48\Opc.Ua.Client.ComplexTypes.dll
Libraries\Opc.Ua.Client.ComplexTypes\bin\Debug\net6.0\Opc.Ua.Client.ComplexTypes.dll
Libraries\Opc.Ua.Client.ComplexTypes\bin\Debug\net8.0\Opc.Ua.Client.ComplexTypes.dll
Libraries\Opc.Ua.Client.ComplexTypes\bin\Debug\net9.0\Opc.Ua.Client.ComplexTypes.dll
Libraries\Opc.Ua.Configuration\bin\Debug\netstandard2.0\Opc.Ua.Configuration.dll
Libraries\Opc.Ua.Configuration\bin\Debug\netstandard2.1\Opc.Ua.Configuration.dll
Libraries\Opc.Ua.Configuration\bin\Debug\net472\Opc.Ua.Configuration.dll
Libraries\Opc.Ua.Configuration\bin\Debug\net48\Opc.Ua.Configuration.dll
Libraries\Opc.Ua.Configuration\bin\Debug\net6.0\Opc.Ua.Configuration.dll
Libraries\Opc.Ua.Configuration\bin\Debug\net8.0\Opc.Ua.Configuration.dll
Libraries\Opc.Ua.Configuration\bin\Debug\net9.0\Opc.Ua.Configuration.dll
Libraries\Opc.Ua.Gds.Client.Common\bin\Debug\netstandard2.0\Opc.Ua.Gds.Client.Common.dll
Libraries\Opc.Ua.Gds.Client.Common\bin\Debug\netstandard2.1\Opc.Ua.Gds.Client.Common.dll
Libraries\Opc.Ua.Gds.Client.Common\bin\Debug\net472\Opc.Ua.Gds.Client.Common.dll
Libraries\Opc.Ua.Gds.Client.Common\bin\Debug\net48\Opc.Ua.Gds.Client.Common.dll
Libraries\Opc.Ua.Gds.Client.Common\bin\Debug\net6.0\Opc.Ua.Gds.Client.Common.dll
Libraries\Opc.Ua.Gds.Client.Common\bin\Debug\net8.0\Opc.Ua.Gds.Client.Common.dll
Libraries\Opc.Ua.Gds.Client.Common\bin\Debug\net9.0\Opc.Ua.Gds.Client.Common.dll
Libraries\Opc.Ua.Gds.Server.Common\bin\Debug\netstandard2.0\Opc.Ua.Gds.Server.Common.dll
Libraries\Opc.Ua.Gds.Server.Common\bin\Debug\netstandard2.1\Opc.Ua.Gds.Server.Common.dll
Libraries\Opc.Ua.Gds.Server.Common\bin\Debug\net472\Opc.Ua.Gds.Server.Common.dll
Libraries\Opc.Ua.Gds.Server.Common\bin\Debug\net48\Opc.Ua.Gds.Server.Common.dll
Libraries\Opc.Ua.Gds.Server.Common\bin\Debug\net6.0\Opc.Ua.Gds.Server.Common.dll
Libraries\Opc.Ua.Gds.Server.Common\bin\Debug\net8.0\Opc.Ua.Gds.Server.Common.dll
Libraries\Opc.Ua.Gds.Server.Common\bin\Debug\net9.0\Opc.Ua.Gds.Server.Common.dll
Libraries\Opc.Ua.Security.Certificates\bin\Debug\netstandard2.0\Opc.Ua.Security.Certificates.dll
Libraries\Opc.Ua.Security.Certificates\bin\Debug\netstandard2.1\Opc.Ua.Security.Certificates.dll
Libraries\Opc.Ua.Security.Certificates\bin\Debug\net472\Opc.Ua.Security.Certificates.dll
Libraries\Opc.Ua.Security.Certificates\bin\Debug\net48\Opc.Ua.Security.Certificates.dll
Libraries\Opc.Ua.Security.Certificates\bin\Debug\net6.0\Opc.Ua.Security.Certificates.dll
Libraries\Opc.Ua.Security.Certificates\bin\Debug\net8.0\Opc.Ua.Security.Certificates.dll
Libraries\Opc.Ua.Security.Certificates\bin\Debug\net9.0\Opc.Ua.Security.Certificates.dll
Libraries\Opc.Ua.PubSub\bin\Debug\netstandard2.1\Opc.Ua.PubSub.dll
Libraries\Opc.Ua.PubSub\bin\Debug\net472\Opc.Ua.PubSub.dll
Libraries\Opc.Ua.PubSub\bin\Debug\net48\Opc.Ua.PubSub.dll
Libraries\Opc.Ua.PubSub\bin\Debug\net6.0\Opc.Ua.PubSub.dll
Libraries\Opc.Ua.PubSub\bin\Debug\net8.0\Opc.Ua.PubSub.dll
Libraries\Opc.Ua.PubSub\bin\Debug\net9.0\Opc.Ua.PubSub.dll
10 changes: 10 additions & 0 deletions .azurepipelines/signlistRelease.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,56 +4,66 @@ Stack\Opc.Ua.Core\bin\Release\net472\Opc.Ua.Core.dll
Stack\Opc.Ua.Core\bin\Release\net48\Opc.Ua.Core.dll
Stack\Opc.Ua.Core\bin\Release\net6.0\Opc.Ua.Core.dll
Stack\Opc.Ua.Core\bin\Release\net8.0\Opc.Ua.Core.dll
Stack\Opc.Ua.Core\bin\Release\net9.0\Opc.Ua.Core.dll
Stack\Opc.Ua.Bindings.Https\bin\Release\netstandard2.0\Opc.Ua.Bindings.Https.dll
Stack\Opc.Ua.Bindings.Https\bin\Release\netstandard2.1\Opc.Ua.Bindings.Https.dll
Stack\Opc.Ua.Bindings.Https\bin\Release\net472\Opc.Ua.Bindings.Https.dll
Stack\Opc.Ua.Bindings.Https\bin\Release\net48\Opc.Ua.Bindings.Https.dll
Stack\Opc.Ua.Bindings.Https\bin\Release\net6.0\Opc.Ua.Bindings.Https.dll
Stack\Opc.Ua.Bindings.Https\bin\Release\net8.0\Opc.Ua.Bindings.Https.dll
Stack\Opc.Ua.Bindings.Https\bin\Release\net9.0\Opc.Ua.Bindings.Https.dll
Libraries\Opc.Ua.Server\bin\Release\netstandard2.0\Opc.Ua.Server.dll
Libraries\Opc.Ua.Server\bin\Release\netstandard2.1\Opc.Ua.Server.dll
Libraries\Opc.Ua.Server\bin\Release\net472\Opc.Ua.Server.dll
Libraries\Opc.Ua.Server\bin\Release\net48\Opc.Ua.Server.dll
Libraries\Opc.Ua.Server\bin\Release\net6.0\Opc.Ua.Server.dll
Libraries\Opc.Ua.Server\bin\Release\net8.0\Opc.Ua.Server.dll
Libraries\Opc.Ua.Server\bin\Release\net9.0\Opc.Ua.Server.dll
Libraries\Opc.Ua.Client\bin\Release\netstandard2.0\Opc.Ua.Client.dll
Libraries\Opc.Ua.Client\bin\Release\netstandard2.1\Opc.Ua.Client.dll
Libraries\Opc.Ua.Client\bin\Release\net472\Opc.Ua.Client.dll
Libraries\Opc.Ua.Client\bin\Release\net48\Opc.Ua.Client.dll
Libraries\Opc.Ua.Client\bin\Release\net6.0\Opc.Ua.Client.dll
Libraries\Opc.Ua.Client\bin\Release\net8.0\Opc.Ua.Client.dll
Libraries\Opc.Ua.Client\bin\Release\net9.0\Opc.Ua.Client.dll
Libraries\Opc.Ua.Client.ComplexTypes\bin\Release\netstandard2.1\Opc.Ua.Client.ComplexTypes.dll
Libraries\Opc.Ua.Client.ComplexTypes\bin\Release\net462\Opc.Ua.Client.ComplexTypes.dll
Libraries\Opc.Ua.Client.ComplexTypes\bin\Release\net472\Opc.Ua.Client.ComplexTypes.dll
Libraries\Opc.Ua.Client.ComplexTypes\bin\Release\net48\Opc.Ua.Client.ComplexTypes.dll
Libraries\Opc.Ua.Client.ComplexTypes\bin\Release\net6.0\Opc.Ua.Client.ComplexTypes.dll
Libraries\Opc.Ua.Client.ComplexTypes\bin\Release\net8.0\Opc.Ua.Client.ComplexTypes.dll
Libraries\Opc.Ua.Client.ComplexTypes\bin\Release\net9.0\Opc.Ua.Client.ComplexTypes.dll
Libraries\Opc.Ua.Configuration\bin\Release\netstandard2.0\Opc.Ua.Configuration.dll
Libraries\Opc.Ua.Configuration\bin\Release\netstandard2.1\Opc.Ua.Configuration.dll
Libraries\Opc.Ua.Configuration\bin\Release\net472\Opc.Ua.Configuration.dll
Libraries\Opc.Ua.Configuration\bin\Release\net48\Opc.Ua.Configuration.dll
Libraries\Opc.Ua.Configuration\bin\Release\net6.0\Opc.Ua.Configuration.dll
Libraries\Opc.Ua.Configuration\bin\Release\net8.0\Opc.Ua.Configuration.dll
Libraries\Opc.Ua.Configuration\bin\Release\net9.0\Opc.Ua.Configuration.dll
Libraries\Opc.Ua.Gds.Client.Common\bin\Release\netstandard2.0\Opc.Ua.Gds.Client.Common.dll
Libraries\Opc.Ua.Gds.Client.Common\bin\Release\netstandard2.1\Opc.Ua.Gds.Client.Common.dll
Libraries\Opc.Ua.Gds.Client.Common\bin\Release\net472\Opc.Ua.Gds.Client.Common.dll
Libraries\Opc.Ua.Gds.Client.Common\bin\Release\net48\Opc.Ua.Gds.Client.Common.dll
Libraries\Opc.Ua.Gds.Client.Common\bin\Release\net6.0\Opc.Ua.Gds.Client.Common.dll
Libraries\Opc.Ua.Gds.Client.Common\bin\Release\net8.0\Opc.Ua.Gds.Client.Common.dll
Libraries\Opc.Ua.Gds.Client.Common\bin\Release\net9.0\Opc.Ua.Gds.Client.Common.dll
Libraries\Opc.Ua.Gds.Server.Common\bin\Release\netstandard2.0\Opc.Ua.Gds.Server.Common.dll
Libraries\Opc.Ua.Gds.Server.Common\bin\Release\netstandard2.1\Opc.Ua.Gds.Server.Common.dll
Libraries\Opc.Ua.Gds.Server.Common\bin\Release\net472\Opc.Ua.Gds.Server.Common.dll
Libraries\Opc.Ua.Gds.Server.Common\bin\Release\net48\Opc.Ua.Gds.Server.Common.dll
Libraries\Opc.Ua.Gds.Server.Common\bin\Release\net6.0\Opc.Ua.Gds.Server.Common.dll
Libraries\Opc.Ua.Gds.Server.Common\bin\Release\net8.0\Opc.Ua.Gds.Server.Common.dll
Libraries\Opc.Ua.Gds.Server.Common\bin\Release\net9.0\Opc.Ua.Gds.Server.Common.dll
Libraries\Opc.Ua.Security.Certificates\bin\Release\netstandard2.0\Opc.Ua.Security.Certificates.dll
Libraries\Opc.Ua.Security.Certificates\bin\Release\netstandard2.1\Opc.Ua.Security.Certificates.dll
Libraries\Opc.Ua.Security.Certificates\bin\Release\net472\Opc.Ua.Security.Certificates.dll
Libraries\Opc.Ua.Security.Certificates\bin\Release\net48\Opc.Ua.Security.Certificates.dll
Libraries\Opc.Ua.Security.Certificates\bin\Release\net6.0\Opc.Ua.Security.Certificates.dll
Libraries\Opc.Ua.Security.Certificates\bin\Release\net8.0\Opc.Ua.Security.Certificates.dll
Libraries\Opc.Ua.Security.Certificates\bin\Release\net9.0\Opc.Ua.Security.Certificates.dll
Libraries\Opc.Ua.PubSub\bin\Release\netstandard2.1\Opc.Ua.PubSub.dll
Libraries\Opc.Ua.PubSub\bin\Release\net472\Opc.Ua.PubSub.dll
Libraries\Opc.Ua.PubSub\bin\Release\net48\Opc.Ua.PubSub.dll
Libraries\Opc.Ua.PubSub\bin\Release\net6.0\Opc.Ua.PubSub.dll
Libraries\Opc.Ua.PubSub\bin\Release\net8.0\Opc.Ua.PubSub.dll
Libraries\Opc.Ua.PubSub\bin\Release\net9.0\Opc.Ua.PubSub.dll
4 changes: 2 additions & 2 deletions .azurepipelines/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ jobs:
packageType: 'sdk'
version: '6.0.x'
- task: UseDotNet@2
displayName: 'Install .NET 8.0'
displayName: 'Install .NET 9.0'
inputs:
packageType: 'sdk'
version: '8.0.x'
version: '9.0.x'
- task: NuGetToolInstaller@1
inputs:
versionSpec: '>=5.8.x'
Expand Down
4 changes: 2 additions & 2 deletions .azurepipelines/testcc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ jobs:
packageType: 'sdk'
version: '6.0.x'
- task: UseDotNet@2
displayName: 'Install .NET 8.0'
displayName: 'Install .NET 9.0'
inputs:
packageType: 'sdk'
version: '8.0.x'
version: '9.0.x'
- task: NuGetToolInstaller@1
inputs:
versionSpec: '>=5.8.x'
Expand Down
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,9 @@ dotnet_diagnostic.CA1819.severity =
# CA1721: The property name is confusing given the existence of another method with the same name.
dotnet_diagnostic.CA1721.severity = silent

# CA2014: Do not use stackalloc in loops
dotnet_diagnostic.CA2014.severity = error

# exclude generated code
[**/Generated/*.cs]
generated_code = true
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/buildandtest.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and Test .NET 8.0
name: Build and Test .NET 9.0

on:
push:
Expand All @@ -22,10 +22,10 @@ jobs:
os: [ubuntu-latest, windows-latest, macOS-latest]
csproj: [Security.Certificates, Core, Server, Client, Client.ComplexTypes, PubSub, Configuration, Gds]
include:
- framework: 'net8.0'
dotnet-version: '8.0.x'
- framework: 'net9.0'
dotnet-version: '9.0.x'
configuration: 'Release'
customtesttarget: net8.0
customtesttarget: net9.0

env:
OS: ${{ matrix.os }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="9.0.0" />
<PackageReference Include="Mono.Options" Version="6.12.0.148" />
<PackageReference Include="Serilog" Version="4.0.2" />
<PackageReference Include="Serilog.Expressions" Version="5.0.0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="9.0.0" />
<PackageReference Include="Mono.Options" Version="6.12.0.148" />
<PackageReference Include="Serilog" Version="4.0.2" />
<PackageReference Include="Serilog.Expressions" Version="5.0.0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,18 @@ public Session Session
}
}

/// <summary>
/// The monitored items owner identity.
/// </summary>
public IUserIdentity EffectiveIdentity
{
get
{
ISubscription subscription = m_subscription;
return subscription?.EffectiveIdentity;
}
}

/// <summary>
/// The identifier for the subscription that the monitored item belongs to.
/// </summary>
Expand Down
6 changes: 6 additions & 0 deletions Fuzzing/Encoders/Fuzz.Tests/EncoderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ public void FuzzGoodTestcases(
FuzzTarget(fuzzableCode, messageEncoder.Testcase);
}

[Theory]
public void FuzzEmptyByteArray(FuzzTargetFunction fuzzableCode)
{
FuzzTarget(fuzzableCode, Array.Empty<byte>());
}

[Theory]
public void FuzzCrashAssets(FuzzTargetFunction fuzzableCode)
{
Expand Down
21 changes: 11 additions & 10 deletions Libraries/Opc.Ua.Client/Session/Session.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ public Session(ITransportChannel channel, Session template, bool copyEventHandle
m_keepAliveInterval = template.KeepAliveInterval;
m_checkDomain = template.m_checkDomain;
m_continuationPointPolicy = template.m_continuationPointPolicy;
ReturnDiagnostics = template.ReturnDiagnostics;
if (template.OperationTimeout > 0)
{
OperationTimeout = template.OperationTimeout;
Expand Down Expand Up @@ -1075,7 +1076,7 @@ public static async Task<ITransportChannel> CreateChannelAsync(
endpoint.Description.ServerCertificate.Length > 0)
{
configuration.CertificateValidator?.ValidateDomains(
new X509Certificate2(endpoint.Description.ServerCertificate),
X509CertificateLoader.LoadCertificate(endpoint.Description.ServerCertificate),
endpoint);
checkDomain = false;
}
Expand Down Expand Up @@ -1439,7 +1440,7 @@ public bool ApplySessionConfiguration(SessionConfiguration sessionConfiguration)

byte[] serverCertificate = m_endpoint.Description?.ServerCertificate;
m_sessionName = sessionConfiguration.SessionName;
m_serverCertificate = serverCertificate != null ? new X509Certificate2(serverCertificate) : null;
m_serverCertificate = serverCertificate != null ? X509CertificateLoader.LoadCertificate(serverCertificate) : null;
m_identity = sessionConfiguration.Identity;
m_checkDomain = sessionConfiguration.CheckDomain;
m_serverNonce = sessionConfiguration.ServerNonce;
Expand Down Expand Up @@ -1686,19 +1687,19 @@ public void FetchOperationLimits()
}
property.SetValue(operationLimits, value);
}

OperationLimits = operationLimits;
if (values[maxBrowseContinuationPointIndex] != null
&& ServiceResult.IsNotBad(errors[maxBrowseContinuationPointIndex]))

if (values[maxBrowseContinuationPointIndex] is UInt16 serverMaxContinuationPointsPerBrowse &&
ServiceResult.IsNotBad(errors[maxBrowseContinuationPointIndex]))
{
ServerMaxContinuationPointsPerBrowse = (UInt16)values[maxBrowseContinuationPointIndex];
ServerMaxContinuationPointsPerBrowse = serverMaxContinuationPointsPerBrowse;
}
if (values[maxByteStringLengthIndex] != null
&& ServiceResult.IsNotBad(errors[maxByteStringLengthIndex]))

if (values[maxByteStringLengthIndex] is UInt32 serverMaxByteStringLength &&
ServiceResult.IsNotBad(errors[maxByteStringLengthIndex]))
{
ServerMaxByteStringLength = (UInt32)values[maxByteStringLengthIndex];
ServerMaxByteStringLength = serverMaxByteStringLength;
}

}
catch (Exception ex)
{
Expand Down
18 changes: 9 additions & 9 deletions Libraries/Opc.Ua.Client/Session/SessionAsync.cs
Original file line number Diff line number Diff line change
Expand Up @@ -639,8 +639,7 @@ public async Task FetchOperationLimitsAsync(CancellationToken ct)
.GetValue(null))
);

// add the server capability MaxContinuationPointPerBrowse. Add further capabilities
// later (when support form them will be implemented and in a more generic fashion)
// add the server capability MaxContinuationPointPerBrowse and MaxByteStringLength
nodeIds.Add(VariableIds.Server_ServerCapabilities_MaxBrowseContinuationPoints);
int maxBrowseContinuationPointIndex = nodeIds.Count - 1;

Expand Down Expand Up @@ -670,17 +669,18 @@ public async Task FetchOperationLimitsAsync(CancellationToken ct)
}
property.SetValue(operationLimits, value);
}

OperationLimits = operationLimits;
if (values[maxBrowseContinuationPointIndex].Value != null
&& ServiceResult.IsNotBad(errors[maxBrowseContinuationPointIndex]))

if (values[maxBrowseContinuationPointIndex].Value is UInt16 serverMaxContinuationPointsPerBrowse &&
ServiceResult.IsNotBad(errors[maxBrowseContinuationPointIndex]))
{
ServerMaxContinuationPointsPerBrowse = (UInt16)values[maxBrowseContinuationPointIndex].Value;
ServerMaxContinuationPointsPerBrowse = serverMaxContinuationPointsPerBrowse;
}
if (values[maxByteStringLengthIndex] != null
&& ServiceResult.IsNotBad(errors[maxByteStringLengthIndex]))

if (values[maxByteStringLengthIndex].Value is UInt32 serverMaxByteStringLength &&
ServiceResult.IsNotBad(errors[maxByteStringLengthIndex]))
{
ServerMaxByteStringLength = (UInt32)values[maxByteStringLengthIndex].Value;
ServerMaxByteStringLength = serverMaxByteStringLength;
}
}
catch (Exception ex)
Expand Down
Loading
Loading