summaryrefslogtreecommitdiffstats
path: root/dnssd/domainbrowser.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-22 00:43:26 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-22 00:43:26 +0000
commit856eea7169f7a4605aed28392857e6c5c80c644c (patch)
treeef60da2c0582e3d606699d8bb9f98317531362a3 /dnssd/domainbrowser.cpp
parent847c48556bc8f7c17bd201ced9381e2fbb2d5d09 (diff)
downloadtdelibs-856eea7169f7a4605aed28392857e6c5c80c644c.tar.gz
tdelibs-856eea7169f7a4605aed28392857e6c5c80c644c.zip
Remaining Avahi fixes
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1152787 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'dnssd/domainbrowser.cpp')
-rw-r--r--dnssd/domainbrowser.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/dnssd/domainbrowser.cpp b/dnssd/domainbrowser.cpp
index 3739bc520..69bde48fe 100644
--- a/dnssd/domainbrowser.cpp
+++ b/dnssd/domainbrowser.cpp
@@ -48,14 +48,21 @@ void domains_callback(AvahiDomainBrowser*, AvahiIfIndex, AvahiProtocol, AvahiBr
class DomainBrowserPrivate
{
public:
- DomainBrowserPrivate(DomainBrowser* owner) : m_browseLAN(false), m_started(false),
- m_browser(0), m_owner(owner) {}
+ DomainBrowserPrivate(DomainBrowser* owner) : m_browseLAN(false), m_started(false)
+#ifdef HAVE_DNSSD
+ , m_browser(0), m_owner(owner)
+#endif
+ {}
+#ifdef HAVE_DNSSD
~DomainBrowserPrivate() { if (m_browser) avahi_domain_browser_free(m_browser); }
+#endif
QStringList m_domains;
virtual void customEvent(QCustomEvent* event);
bool m_browseLAN;
bool m_started;
+#ifdef HAVE_DNSSD
AvahiDomainBrowser* m_browser;
+#endif
DomainBrowser* m_owner;
};
@@ -132,10 +139,12 @@ void DomainBrowser::domainListChanged(int message,int)
if (message!=KIPCDomainsChanged) return;
bool was_started = d->m_started;
+#ifdef HAVE_DNSSD
if (d->m_browser) {
avahi_domain_browser_free(d->m_browser); // LAN query
d->m_browser=0;
}
+#endif
d->m_started = false;
// remove all domains and resolvers