Skip to content

Commit

Permalink
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.
  • Loading branch information
rgoliver authored and pull[bot] committed Jan 4, 2024
1 parent 22f1874 commit de8a355
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
Expand Up @@ -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.
Expand Down

0 comments on commit de8a355

Please sign in to comment.