OpenZWave / open-zwave

a C++ library to control Z-Wave Networks via a USB Z-Wave Controller.
http://www.openzwave.net/
GNU Lesser General Public License v3.0
1.05k stars 918 forks source link

Add length of message to duplicate message detection (addresses #2587) #2589

Open rrozema opened 3 years ago

rrozema commented 3 years ago

As described in issue #2587 a duplicate message may fail to be detected because additional bytes from previous messages are included in the comparison. This PR tries to address this by adding the length of a previously received message in the nod structure and use it in the comparison for a new incoming message. Also added setting the remainder of the buffer to 0x00 to make it more clear which data was actually in the buffer.