diff options
author | Tobias Markmann <tm@ayena.de> | 2016-11-23 17:28:01 (GMT) |
---|---|---|
committer | Tobias Markmann <tm@ayena.de> | 2016-11-23 17:28:01 (GMT) |
commit | 2f90eb7409df91a80c60b189242ac0c1de313910 (patch) | |
tree | 74170cd9017eae0b8a4e9354241e9fa8da36273b /Swiften/LinkLocal/DNSSD/Avahi/AvahiResolveHostnameQuery.cpp | |
parent | e405ff3561be3d3c0bd79d7d5173923a8828cf02 (diff) | |
download | swift-2f90eb7409df91a80c60b189242ac0c1de313910.zip swift-2f90eb7409df91a80c60b189242ac0c1de313910.tar.bz2 |
Fix building with Avahi support on Linux
This was broken in commit 43479ef.
Test-Information:
Build with Avahi support on Ubuntu 16.04.1. Unit tests
passed.
Change-Id: If7ee5f740510956d89f6c406e68b92ddeb61cf85
Diffstat (limited to 'Swiften/LinkLocal/DNSSD/Avahi/AvahiResolveHostnameQuery.cpp')
-rw-r--r-- | Swiften/LinkLocal/DNSSD/Avahi/AvahiResolveHostnameQuery.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Swiften/LinkLocal/DNSSD/Avahi/AvahiResolveHostnameQuery.cpp b/Swiften/LinkLocal/DNSSD/Avahi/AvahiResolveHostnameQuery.cpp index 6510275..08de722 100644 --- a/Swiften/LinkLocal/DNSSD/Avahi/AvahiResolveHostnameQuery.cpp +++ b/Swiften/LinkLocal/DNSSD/Avahi/AvahiResolveHostnameQuery.cpp @@ -6,18 +6,20 @@ #include <Swiften/LinkLocal/DNSSD/Avahi/AvahiResolveHostnameQuery.h> -#include <iostream> - #include <boost/bind.hpp> +#include <netinet/in.h> + +#include <Swiften/Base/Log.h> + namespace Swift { AvahiResolveHostnameQuery::AvahiResolveHostnameQuery(const std::string& hostname, int, std::shared_ptr<AvahiQuerier> querier, EventLoop* eventLoop) : AvahiQuery(querier, eventLoop), hostname(hostname) { - std::cout << "Resolving hostname " << hostname << std::endl; + SWIFT_LOG(debug) << "Resolving hostname " << hostname << std::endl; } void AvahiResolveHostnameQuery::run() { - eventLoop->postEvent(boost::bind(boost::ref(onHostnameResolved), boost::optional<HostAddress>(HostAddress(hostname))), shared_from_this()); + eventLoop->postEvent(boost::bind(boost::ref(onHostnameResolved), HostAddress::fromString(hostname)), shared_from_this()); } } |