Skip to content

Commit 4c065d9

Browse files
committed
Updated as per new review feedback and fixed builds
1 parent 2ac0919 commit 4c065d9

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/lib/dnssd/Discovery_ImplPlatform.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,7 @@ static void HandleNodeBrowse(void * context, DnssdService * services, size_t ser
9696
auto & ipAddress = services[i].mAddress;
9797

9898
// mType(service name) exactly matches with operational service name
99-
bool isOperationalBrowse = (strncmp(services[i].mType, kOperationalServiceName, sizeof(services[i].mType)) == 0 &&
100-
strlen(services[i].mType) == strlen(kOperationalServiceName));
99+
bool isOperationalBrowse = (strcmp(services[i].mType, kOperationalServiceName, sizeof(services[i].mType)) == 0);
101100

102101
// For operational browse result we currently don't need IP address hence skip resolution and handle differently.
103102
if (isOperationalBrowse)

src/platform/Darwin/DnssdContexts.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -609,8 +609,7 @@ bool ResolveContext::TryReportingResultsForInterfaceIndex(uint32_t interfaceInde
609609
DiscoveredNodeData nodeData;
610610

611611
// mType(service name) exactly matches with operational service name
612-
if (strncmp(services[i].mType, kOperationalServiceName, sizeof(services[i].mType)) == 0 &&
613-
strlen(services[i].mType) == strlen(kOperationalServiceName))
612+
if (strncmp(service[i].mType, kOperationalServiceName, sizeof(service[i].mType)) == 0)
614613
{
615614
service.ToDiscoveredOperationalNodeBrowseData(nodeData);
616615
}

0 commit comments

Comments
 (0)