Error when extracting PDU in block fragmented messages

Project: 
gurux.dlms.c

File dlms.c, line 5209, function dlms_getPdu()

As the client receives PDUs they are queued into the data->data buffer. If the response of the meter is of type Set-response-datablock, the client always deletes the position of the last queued PDU by resetting the position to 0 or 1:

if (!settings->server || data->command == DLMS_COMMAND_AARE || data->command == DLMS_COMMAND_AARQ)
{
data->data.position = 0;
}
else
{
data->data.position = 1;
}

Status: 
Active
Priority: 
Normal
Category: 
Bug report
Component: 
Code
Reporter: 
gunmox
Created: 
Thu, 10/28/2021 - 23:36
Updated: 
Thu, 10/28/2021 - 23:36