Skip to content

Commit

Permalink
fix issue 13122 (#13123)
Browse files Browse the repository at this point in the history
* fix issue 13122

* fix regression

* fix issue 13122

* fix regression

* Restyled by gn (#13124)

Co-authored-by: Restyled.io <[email protected]>

Co-authored-by: Christopher DeCenzo <[email protected]>
Co-authored-by: restyled-io[bot] <32688539+restyled-io[bot]@users.noreply.github.com>
Co-authored-by: Restyled.io <[email protected]>
  • Loading branch information
4 people authored and pull[bot] committed Feb 26, 2022
1 parent 6845303 commit 380405d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions examples/tv-app/linux/args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 2 additions & 0 deletions examples/tv-casting-app/linux/args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion src/app/server/Dnssd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<const char *>::Value(rotatingDeviceIdHexBuffer));
advertiseParameters.SetRotatingDeviceId(chip::Optional<const char *>::Value(rotatingDeviceIdHexBuffer));
#endif

advertiseParameters.SetMRPConfig(gDefaultMRPConfig).SetTcpSupported(Optional<bool>(INET_CONFIG_ENABLE_TCP_ENDPOINT));
Expand Down
4 changes: 1 addition & 3 deletions src/lib/dnssd/Resolver.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 380405d

Please sign in to comment.