From 090e08d54d38cf2b8abf8b9c33a12b3e88096f46 Mon Sep 17 00:00:00 2001
From: Daniel Svensson <dsvensson@gmail.com>
Date: Mon, 6 Aug 2012 22:39:36 +0200
Subject: BUG(2538): Check FDs in dnssd consumers to avoid 100% CPU.
diff --git a/src/clients/mdns/dns_sd/mdns-dnssd.c b/src/clients/mdns/dns_sd/mdns-dnssd.c
index 2c99845..590acc0 100644
--- src/clients/mdns/dns_sd/mdns-dnssd.c
+++ src/clients/mdns/dns_sd/mdns-dnssd.c
@@ -71,8 +71,16 @@ dns_ipc_source_prepare (GSource *source, gint *timeout_)
dns_ipc_source_check (GSource *source)
- /* Maybe check for errors here? */
+ for (list = source->poll_fds; list != NULL; list = list->next) {
+ GPollFD *fd = list->data;
+ if (fd->revents != 0) {
diff --git a/src/plugins/daap/daap_mdns_dnssd.c b/src/plugins/daap/daap_mdns_dnssd.c
index 2439925..819ffed 100644
--- src/plugins/daap/daap_mdns_dnssd.c
+++ src/plugins/daap/daap_mdns_dnssd.c
@@ -242,8 +242,16 @@ g_mdns_source_prepare (GSource *source, gint *timeout_)
g_mdns_source_check (GSource *source)
- /* Maybe check for errors here? */
+ for (list = source->poll_fds; list != NULL; list = list->next) {
+ GPollFD *fd = list->data;
+ if (fd->revents != 0) {