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

PreEstabilishedSystemTitle null #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

kyakan
Copy link

@kyakan kyakan commented Jan 14, 2025

Description of the issue:

In the .NET implementation, when the ServerSystemTitle is set, the PreEstablishedSystemTitle is automatically updated. However, this behavior is not present in the Java version.

.NET reference:
https://github.com/Gurux/Gurux.DLMS.Net/blob/c4290171bdc67d51949c9b9de2be1aa9aee30e27/Development/Secure/GXDLMSSecureClient.cs#L165

Java reference:

// General protection can be used with pre-established
// connections.
&& ((p.getSettings().getPreEstablishedSystemTitle() == null

Additionally, in Java, it's not possible to use general protection under certain conditions, as highlighted in the provided link.
Proposed solution:

Align the Java behavior with the .NET version by ensuring that setting the ServerSystemTitle also updates the PreEstablishedSystemTitle.

In .NET version, when the ServerSystemTitle is set, we get updated the PreEstabilishedSystemTitle, in java not.

https://github.com/Gurux/Gurux.DLMS.Net/blob/c4290171bdc67d51949c9b9de2be1aa9aee30e27/Development/Secure/GXDLMSSecureClient.cs#L165
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant