From 353022b20f6fe6bddff9cab99e68fd8dde3d79b3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Remko=20Tron=C3=A7on?= <git@el-tramo.be>
Date: Thu, 22 Apr 2010 22:07:55 +0200
Subject: Clean up Avahi browse query properly.


diff --git a/Swiften/LinkLocal/DNSSD/Avahi/AvahiBrowseQuery.h b/Swiften/LinkLocal/DNSSD/Avahi/AvahiBrowseQuery.h
index a7b6db1..cca0475 100644
--- a/Swiften/LinkLocal/DNSSD/Avahi/AvahiBrowseQuery.h
+++ b/Swiften/LinkLocal/DNSSD/Avahi/AvahiBrowseQuery.h
@@ -35,7 +35,11 @@ namespace Swift {
 			}
 
 			void stopBrowsing() {
-				// TODO
+				assert(browser);
+				avahi_threaded_poll_lock(querier->getThreadedPoll());
+				avahi_server_browser_free(browser);
+				browser = NULL;
+				avahi_threaded_poll_unlock(querier->getThreadedPoll());
 			}
 
 		private:
-- 
cgit v0.10.2-6-g49f6