From aec16f28deb5efb63cf762349a00af096ca0ee47 Mon Sep 17 00:00:00 2001 From: i96751414 Date: Sun, 20 Apr 2025 00:36:40 +0100 Subject: [PATCH] Fix handleReleaseRequest sizes This fixes the payload sent (wrong sizes being used) as the response for the release request. --- development/src/main/java/gurux/dlms/GXDLMSServerBase.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/development/src/main/java/gurux/dlms/GXDLMSServerBase.java b/development/src/main/java/gurux/dlms/GXDLMSServerBase.java index 6dddd66c..6778019c 100644 --- a/development/src/main/java/gurux/dlms/GXDLMSServerBase.java +++ b/development/src/main/java/gurux/dlms/GXDLMSServerBase.java @@ -680,12 +680,12 @@ private void handleReleaseRequest(final GXByteBuffer data, final GXDLMSConnectio byte[] tmp = GXAPDU.getUserInformation(settings, settings.getCipher()); replyData.setUInt8(0x63); // Len. - replyData.setUInt8((byte) (tmp.length + 3)); + replyData.setUInt8((byte) (tmp.length + 7)); replyData.setUInt8(0x80); replyData.setUInt8(0x01); replyData.setUInt8(0x00); replyData.setUInt8(0xBE); - replyData.setUInt8((byte) (tmp.length + 1)); + replyData.setUInt8((byte) (tmp.length + 2)); replyData.setUInt8(4); replyData.setUInt8((byte) (tmp.length)); replyData.set(tmp);