From 4618369b00ea3a3574e66c10e3373092f7f09f79 Mon Sep 17 00:00:00 2001 From: Shubham Patil Date: Fri, 14 Oct 2022 20:04:12 +0530 Subject: [PATCH] rpc: remove the fallback options for device info in rpc service (#23175) --- examples/common/pigweed/rpc_services/Device.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/examples/common/pigweed/rpc_services/Device.h b/examples/common/pigweed/rpc_services/Device.h index 4a80cb44516236..2e6f441bc9d95a 100644 --- a/examples/common/pigweed/rpc_services/Device.h +++ b/examples/common/pigweed/rpc_services/Device.h @@ -317,7 +317,7 @@ class Device : public pw_rpc::nanopb::Device::Service } else { - response.vendor_id = CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID; + return pw::Status::Internal(); } uint16_t product_id; @@ -327,7 +327,7 @@ class Device : public pw_rpc::nanopb::Device::Service } else { - response.product_id = CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID; + return pw::Status::Internal(); } uint32_t software_version; @@ -337,14 +337,13 @@ class Device : public pw_rpc::nanopb::Device::Service } else { - response.software_version = CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION; + return pw::Status::Internal(); } if (DeviceLayer::ConfigurationMgr().GetSoftwareVersionString(response.software_version_string, sizeof(response.software_version_string)) != CHIP_NO_ERROR) { - snprintf(response.software_version_string, sizeof(response.software_version_string), - CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING); + return pw::Status::Internal(); } uint32_t code; @@ -364,7 +363,7 @@ class Device : public pw_rpc::nanopb::Device::Service if (DeviceLayer::GetDeviceInstanceInfoProvider()->GetSerialNumber(response.serial_number, sizeof(response.serial_number)) != CHIP_NO_ERROR) { - snprintf(response.serial_number, sizeof(response.serial_number), CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER); + return pw::Status::Internal(); } // Create buffer for QR code that can fit max size and null terminator.