diff --git a/development/src/GXDLMS.cpp b/development/src/GXDLMS.cpp index ee583cba..d9c30908 100644 --- a/development/src/GXDLMS.cpp +++ b/development/src/GXDLMS.cpp @@ -857,7 +857,9 @@ int CGXDLMS::GetLNPdu( } // Add attribute descriptor. - reply.Set(p.GetAttributeDescriptor()); + if (!((p.GetCommand() == DLMS_COMMAND_SET_REQUEST) && (p.GetRequestType() == 3))) + reply.Set(p.GetAttributeDescriptor()); + // If multiple blocks. if (p.IsMultipleBlocks() && (p.GetSettings()->GetNegotiatedConformance() & DLMS_CONFORMANCE_GENERAL_BLOCK_TRANSFER) == 0) { @@ -909,7 +911,7 @@ int CGXDLMS::GetLNPdu( len -= GXHelpers::GetObjectCountSizeInBytes(len); } GXHelpers::SetObjectCount(len, reply); - reply.Set(p.GetData(), 0, len); + reply.Set(p.GetData(), p.GetData()->GetPosition(), len); } // Add data that fits to one block. if (len == 0) @@ -4139,4 +4141,4 @@ int CGXDLMS::HandleExceptionResponse(CGXReplyData& data) return DLMS_ERROR_TYPE_EXCEPTION_RESPONSE | value << 8 | error; } return 0; -} \ No newline at end of file +}