From 380405da7cb9e8b3e8cf62db45a95173ad839d2f Mon Sep 17 00:00:00 2001 From: chrisdecenzo <61757564+chrisdecenzo@users.noreply.github.com> Date: Wed, 22 Dec 2021 16:41:30 -0800 Subject: [PATCH] fix issue 13122 (#13123) * fix issue 13122 * fix regression * fix issue 13122 * fix regression * Restyled by gn (#13124) Co-authored-by: Restyled.io Co-authored-by: Christopher DeCenzo Co-authored-by: restyled-io[bot] <32688539+restyled-io[bot]@users.noreply.github.com> Co-authored-by: Restyled.io --- examples/tv-app/linux/args.gni | 2 ++ examples/tv-casting-app/linux/args.gni | 2 ++ src/app/server/Dnssd.cpp | 2 +- src/lib/dnssd/Resolver.h | 4 +--- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/examples/tv-app/linux/args.gni b/examples/tv-app/linux/args.gni index 1c8eb57e4d1e09..beb195669abda2 100644 --- a/examples/tv-app/linux/args.gni +++ b/examples/tv-app/linux/args.gni @@ -25,3 +25,5 @@ chip_project_config_include_dirs = chip_project_config_include_dirs += [ "${chip_root}/config/standalone" ] chip_build_libshell = true + +chip_enable_rotating_device_id = true diff --git a/examples/tv-casting-app/linux/args.gni b/examples/tv-casting-app/linux/args.gni index 54b1b3bb30fabb..e0364467f6c10e 100644 --- a/examples/tv-casting-app/linux/args.gni +++ b/examples/tv-casting-app/linux/args.gni @@ -25,3 +25,5 @@ chip_project_config_include_dirs = chip_project_config_include_dirs += [ "${chip_root}/config/standalone" ] chip_build_libshell = true + +chip_enable_rotating_device_id = true diff --git a/src/app/server/Dnssd.cpp b/src/app/server/Dnssd.cpp index 306faf23de15ff..3ce263b7cf3afc 100644 --- a/src/app/server/Dnssd.cpp +++ b/src/app/server/Dnssd.cpp @@ -338,7 +338,7 @@ CHIP_ERROR DnssdServer::Advertise(bool commissionableNode, chip::Dnssd::Commissi #if CHIP_ENABLE_ROTATING_DEVICE_ID char rotatingDeviceIdHexBuffer[RotatingDeviceId::kHexMaxLength]; ReturnErrorOnFailure(GenerateRotatingDeviceId(rotatingDeviceIdHexBuffer, ArraySize(rotatingDeviceIdHexBuffer))); - advertiseParameters.SetRotatingId(chip::Optional::Value(rotatingDeviceIdHexBuffer)); + advertiseParameters.SetRotatingDeviceId(chip::Optional::Value(rotatingDeviceIdHexBuffer)); #endif advertiseParameters.SetMRPConfig(gDefaultMRPConfig).SetTcpSupported(Optional(INET_CONFIG_ENABLE_TCP_ENDPOINT)); diff --git a/src/lib/dnssd/Resolver.h b/src/lib/dnssd/Resolver.h index edc3d07622be4f..86020e551b0264 100644 --- a/src/lib/dnssd/Resolver.h +++ b/src/lib/dnssd/Resolver.h @@ -163,14 +163,12 @@ struct DiscoveredNodeData void LogDetail() const { -#if CHIP_ENABLE_ROTATING_DEVICE_ID if (rotatingIdLen > 0) { char rotatingIdString[chip::Dnssd::kMaxRotatingIdLen * 2 + 1] = ""; Encoding::BytesToUppercaseHexString(rotatingId, rotatingIdLen, rotatingIdString, sizeof(rotatingIdString)); - ChipLogDetail(Discovery, "Rotating ID: %s", rotatingIdString); + ChipLogDetail(Discovery, "\tRotating ID: %s", rotatingIdString); } -#endif // CHIP_ENABLE_ROTATING_DEVICE_ID if (strlen(deviceName) != 0) { ChipLogDetail(Discovery, "\tDevice Name: %s", deviceName);