pw_transfer: Always set protocol version in final chunk This ensures that a protocol version is always set when a transfer sends its final chunk, even if one has not been yet configured through the handshake. In these cases, uses the client's desired protocol version. Additionally, fixes a bug where a chunk received in a COMPLETED state went through a protocol version check in receive transfers, overriding the original status with INTERNAL. Transmit transfers were already correctly handling this by avoiding the protocol version check in this state. Change-Id: Iac6623c9a9042ed3520f25681041f86708db5abb Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/229289 Reviewed-by: Wyatt Hepler <hepler@google.com> Commit-Queue: Alexei Frolov <frolv@google.com> Reviewed-by: Jordan Brauer <jtbrauer@google.com> Lint: Lint 🤖 <android-build-ayeaye@system.gserviceaccount.com>
Pigweed is an open source collection of embedded-targeted libraries–or as we like to call them, modules. These modules are building blocks and infrastructure that enable faster and more reliable development on small-footprint MMU-less 32-bit microcontrollers like the STMicroelectronics STM32L452 or the Nordic nRF52832.
For more information please see our website: https://pigweed.dev/.