Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rpc: Make GetSerialNumber optional (#24851)
Browse files Browse the repository at this point in the history
GetSerialNumber previously returned an error if not provided, this
is optional in the spec and should just not return the value if it
is not available.
rgoliver authored and pull[bot] committed Sep 14, 2023

Verified

This commit was signed with the committer’s verified signature.
mkllnk Maikel
1 parent 19eb0f0 commit 3472920
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/common/pigweed/rpc_services/Device.h
Original file line number Diff line number Diff line change
@@ -372,7 +372,7 @@ class Device : public pw_rpc::nanopb::Device::Service<Device>
if (DeviceLayer::GetDeviceInstanceInfoProvider()->GetSerialNumber(response.serial_number, sizeof(response.serial_number)) !=
CHIP_NO_ERROR)
{
return pw::Status::Internal();
response.serial_number[0] = '\0'; // optional serial field not set.
}

// Create buffer for QR code that can fit max size and null terminator.

0 comments on commit 3472920

Please sign in to comment.