Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix issue 13122 #13123

Merged
merged 7 commits into from
Dec 23, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
3 changes: 3 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,6 @@ 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