From 138988451a3cf3d9758f67228f5b9d76cab1abc9 Mon Sep 17 00:00:00 2001 From: Vivien Nicolas Date: Wed, 1 Dec 2021 16:50:17 +0100 Subject: [PATCH] kMaxCommisisonableServiceNameSize -> kMaxCommissionableServiceNameSize and kMaxCommisisonerServiceNameSize -> kMaxCommissionerServiceNameSize (#12405) --- src/lib/dnssd/Discovery_ImplPlatform.cpp | 4 ++-- src/lib/dnssd/ServiceNaming.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/dnssd/Discovery_ImplPlatform.cpp b/src/lib/dnssd/Discovery_ImplPlatform.cpp index ea94fed4763e47..109bbc69abbb39 100644 --- a/src/lib/dnssd/Discovery_ImplPlatform.cpp +++ b/src/lib/dnssd/Discovery_ImplPlatform.cpp @@ -534,7 +534,7 @@ void DiscoveryImplPlatform::HandleNodeResolve(void * context, DnssdService * res CHIP_ERROR DiscoveryImplPlatform::FindCommissionableNodes(DiscoveryFilter filter) { ReturnErrorOnFailure(InitImpl()); - char serviceName[kMaxCommisisonableServiceNameSize]; + char serviceName[kMaxCommissionableServiceNameSize]; ReturnErrorOnFailure(MakeServiceTypeName(serviceName, sizeof(serviceName), filter, DiscoveryType::kCommissionableNode)); return ChipDnssdBrowse(serviceName, DnssdServiceProtocol::kDnssdProtocolUdp, Inet::IPAddressType::kAny, @@ -544,7 +544,7 @@ CHIP_ERROR DiscoveryImplPlatform::FindCommissionableNodes(DiscoveryFilter filter CHIP_ERROR DiscoveryImplPlatform::FindCommissioners(DiscoveryFilter filter) { ReturnErrorOnFailure(InitImpl()); - char serviceName[kMaxCommisisonerServiceNameSize]; + char serviceName[kMaxCommissionerServiceNameSize]; ReturnErrorOnFailure(MakeServiceTypeName(serviceName, sizeof(serviceName), filter, DiscoveryType::kCommissionerNode)); return ChipDnssdBrowse(serviceName, DnssdServiceProtocol::kDnssdProtocolUdp, Inet::IPAddressType::kAny, diff --git a/src/lib/dnssd/ServiceNaming.h b/src/lib/dnssd/ServiceNaming.h index 1c8f9e62c91d60..10e5abba465774 100644 --- a/src/lib/dnssd/ServiceNaming.h +++ b/src/lib/dnssd/ServiceNaming.h @@ -37,11 +37,11 @@ constexpr char kCommissionProtocol[] = "_udp"; constexpr char kLocalDomain[] = "local"; // each includes space for a null terminator, which becomes a . when the names are appended. -constexpr size_t kMaxCommisisonableServiceNameSize = +constexpr size_t kMaxCommissionableServiceNameSize = Common::kSubTypeMaxLength + 1 + sizeof(kSubtypeServiceNamePart) + sizeof(kCommissionableServiceName); // each includes space for a null terminator, which becomes a . when the names are appended. -constexpr size_t kMaxCommisisonerServiceNameSize = +constexpr size_t kMaxCommissionerServiceNameSize = Common::kSubTypeMaxLength + 1 + sizeof(kSubtypeServiceNamePart) + sizeof(kCommissionerServiceName); // + 1 for nullchar on prefix.