summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2016-11-23 17:28:01 (GMT)
committerTobias Markmann <tm@ayena.de>2016-11-23 17:28:01 (GMT)
commit2f90eb7409df91a80c60b189242ac0c1de313910 (patch)
tree74170cd9017eae0b8a4e9354241e9fa8da36273b /Swiften
parente405ff3561be3d3c0bd79d7d5173923a8828cf02 (diff)
downloadswift-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')
-rw-r--r--Swiften/LinkLocal/DNSSD/Avahi/AvahiResolveHostnameQuery.cpp10
-rw-r--r--Swiften/LinkLocal/DNSSD/Avahi/AvahiResolveHostnameQuery.h2
2 files changed, 6 insertions, 6 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());
}
}
diff --git a/Swiften/LinkLocal/DNSSD/Avahi/AvahiResolveHostnameQuery.h b/Swiften/LinkLocal/DNSSD/Avahi/AvahiResolveHostnameQuery.h
index 5498285..33c425f 100644
--- a/Swiften/LinkLocal/DNSSD/Avahi/AvahiResolveHostnameQuery.h
+++ b/Swiften/LinkLocal/DNSSD/Avahi/AvahiResolveHostnameQuery.h
@@ -8,8 +8,6 @@
#include <string>
-#include <netinet/in.h>
-
#include <Swiften/EventLoop/EventLoop.h>
#include <Swiften/LinkLocal/DNSSD/Avahi/AvahiQuery.h>
#include <Swiften/LinkLocal/DNSSD/DNSSDResolveHostnameQuery.h>