Skip to content

Commit

Permalink
Add missing includes
Browse files Browse the repository at this point in the history
  • Loading branch information
badaix committed Apr 3, 2024
1 parent aa82ba8 commit 3228c41
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
13 changes: 7 additions & 6 deletions client/browseZeroConf/browse_bonjour.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

// local headers
#include "common/aixlog.hpp"
#include "common/snap_exception.hpp"

// standard headers
#include <iostream>
Expand Down Expand Up @@ -200,12 +201,12 @@ bool BrowseBonjour::browse(const string& serviceName, mDNSResult& result, int /*
service.get(), 0, 0, serviceName.c_str(), "local.",
[](DNSServiceRef /*service*/, DNSServiceFlags /*flags*/, uint32_t /*interfaceIndex*/, DNSServiceErrorType errorCode, const char* serviceName,
const char* regtype, const char* replyDomain, void* context)
{
{
auto replyCollection = static_cast<deque<mDNSReply>*>(context);

CHECKED(errorCode);
replyCollection->push_back(mDNSReply{string(serviceName), string(regtype), string(replyDomain)});
},
},
&replyCollection));

runService(service);
Expand All @@ -220,12 +221,12 @@ bool BrowseBonjour::browse(const string& serviceName, mDNSResult& result, int /*
service.get(), 0, 0, reply.name.c_str(), reply.regtype.c_str(), reply.domain.c_str(),
[](DNSServiceRef /*service*/, DNSServiceFlags /*flags*/, uint32_t /*interfaceIndex*/, DNSServiceErrorType errorCode, const char* /*fullName*/,
const char* hosttarget, uint16_t port, uint16_t /*txtLen*/, const unsigned char* /*txtRecord*/, void* context)
{
{
auto resultCollection = static_cast<deque<mDNSResolve>*>(context);

CHECKED(errorCode);
resultCollection->push_back(mDNSResolve{string(hosttarget), ntohs(port)});
},
},
&resolveCollection));

runService(service);
Expand All @@ -243,7 +244,7 @@ bool BrowseBonjour::browse(const string& serviceName, mDNSResult& result, int /*
service.get(), kDNSServiceFlagsLongLivedQuery, 0, kDNSServiceProtocol_IPv4, resolve.fullName.c_str(),
[](DNSServiceRef /*service*/, DNSServiceFlags /*flags*/, uint32_t interfaceIndex, DNSServiceErrorType /*errorCode*/, const char* hostname,
const sockaddr* address, uint32_t /*ttl*/, void* context)
{
{
auto result = static_cast<mDNSResult*>(context);

result->host = string(hostname);
Expand All @@ -257,7 +258,7 @@ bool BrowseBonjour::browse(const string& serviceName, mDNSResult& result, int /*
else
return;
result->valid = true;
},
},
&resultCollection[i++]));
}
runService(service);
Expand Down
1 change: 1 addition & 0 deletions client/browseZeroConf/browse_mdns.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#pragma once

// standard headers
#include <cstdint>
#include <string>

enum IPVersion
Expand Down

0 comments on commit 3228c41

Please sign in to comment.