secsgem icon indicating copy to clipboard operation
secsgem copied to clipboard

handle secsi multi-block error

Open auosun opened this issue 1 year ago • 1 comments

When the secsi message is too long and is split into two blocks, the length of the data in the first block is 244,then image When the message is passed in, the header processing sets 'last_block' to false. However, after going through the method shown in the diagram, 'last_block' is overwritten as True, causing incorrect handling of splitting.

I have removed the red portion shown in the diagram in the SecsIMessage class to fix this issue. I'm not sure if it's correct, and I'm unsure if there are any other problems."

auosun avatar May 22 '24 06:05 auosun

When I change it like this, it will affect the sending of the message, so I made the following changes image Hope you can help me point out the mistake, thanks

auosun avatar May 28 '24 08:05 auosun

Thank you for your report. I finally had the time to look into it and fix it. My fix is very close to your pull request, but I decided not to duplicate the code and fix it in the existing functions.

bparzella avatar Aug 12 '24 20:08 bparzella