commit | 00e693c6fb7b9423fa31475b6abe63bca2fd01d3 | [log] [tgz] |
---|---|---|
author | Wyatt Hepler <hepler@google.com> | Tue Jan 31 23:17:01 2023 +0000 |
committer | CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> | Tue Jan 31 23:17:01 2023 +0000 |
tree | 87575a9d9251e2dd5d251ca09e96315af085117e | |
parent | d12ae88c1199d8f94573114080d05e493d4ae171 [diff] |
pw_rpc: Prevent starting calls with channel ID 0 - Channel ID 0 (Channel::kUnassignedChannelID) cannot be used for calls, and any packets with channel ID 0 are already rejected by RPC endpoints. Add a PW_CHECK() that crashes if code attempts to start a call on channel 0. - Add a test for invoking a call on an unknown channel. No test is added for starting calls on channel 0, since pw_unit_test does not support testing that assertions failed. Change-Id: Idc4a21925694c6300daa507c160fbf6822a93244 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/127036 Pigweed-Auto-Submit: Wyatt Hepler <hepler@google.com> Reviewed-by: Erik Gilling <konkers@google.com> Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.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/.