[141613] trunk/dports/audio/xmms2/files/patch-dnssd-fd-check.diff

devans at macports.org devans at macports.org
Sat Dec 12 02:16:20 PST 2015


Revision: 141613
          https://trac.macports.org/changeset/141613
Author:   devans at macports.org
Date:     2015-10-23 06:43:44 -0700 (Fri, 23 Oct 2015)
Log Message:
-----------
xmms2: add missing patch file.

Added Paths:
-----------
    trunk/dports/audio/xmms2/files/patch-dnssd-fd-check.diff

Added: trunk/dports/audio/xmms2/files/patch-dnssd-fd-check.diff
===================================================================
--- trunk/dports/audio/xmms2/files/patch-dnssd-fd-check.diff	                        (rev 0)
+++ trunk/dports/audio/xmms2/files/patch-dnssd-fd-check.diff	2015-10-23 13:43:44 UTC (rev 141613)
@@ -0,0 +1,55 @@
+From 090e08d54d38cf2b8abf8b9c33a12b3e88096f46 Mon Sep 17 00:00:00 2001
+From: Daniel Svensson <dsvensson at 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_)
+ static gboolean
+ dns_ipc_source_check (GSource *source)
+ {
+-	/* Maybe check for errors here? */
+-	return TRUE;
++	GSList *list;
++
++	for (list = source->poll_fds; list != NULL; list = list->next) {
++		GPollFD *fd = list->data;
++		if (fd->revents != 0) {
++			return TRUE;
++		}
++	}
++
++	return FALSE;
+ }
+ 
+ static gboolean
+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_)
+ static gboolean
+ g_mdns_source_check (GSource *source)
+ {
+-	/* Maybe check for errors here? */
+-	return TRUE;
++	GSList *list;
++
++	for (list = source->poll_fds; list != NULL; list = list->next) {
++		GPollFD *fd = list->data;
++		if (fd->revents != 0) {
++			return TRUE;
++		}
++	}
++
++	return FALSE;
+ }
+ 
+ static gboolean
+-- 
+cgit v0.10.2
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20151212/cfc98a4d/attachment.html>


More information about the macports-changes mailing list