[libdmapsharing] Change browser_remove_service so that argument to service-removed signal is



commit 498dcd269aa9dad226fdadedd23eeb1beb9249ec
Author: W. Michael Petullo <mike flyn org>
Date:   Sat Dec 5 20:54:49 2009 -0500

    Change browser_remove_service so that argument to service-removed signal is
    a string service name instead of a DMAPMdnsBrowserService. This is what
    Rhythmbox expects.
    Signed-off-by: W. Michael Petullo <mike flyn org>

 libdmapsharing/dmap-mdns-browser-avahi.c |   15 ++++-----------
 libdmapsharing/dmap-mdns-browser-howl.c  |   15 ++++-----------
 2 files changed, 8 insertions(+), 22 deletions(-)
---
diff --git a/libdmapsharing/dmap-mdns-browser-avahi.c b/libdmapsharing/dmap-mdns-browser-avahi.c
index 0a38880..de3199b 100644
--- a/libdmapsharing/dmap-mdns-browser-avahi.c
+++ b/libdmapsharing/dmap-mdns-browser-avahi.c
@@ -461,17 +461,10 @@ static void
 browser_remove_service (DMAPMdnsBrowser *browser,
                         const gchar *service_name)
 {
-    GSList *walk;
-    DMAPMdnsBrowserService *service;
-    for (walk = browser->priv->services; walk; walk = walk->next) {
-        service = (DMAPMdnsBrowserService *) walk->data;
-        if (g_ascii_strcasecmp (service->service_name, service_name) == 0) {
-            g_signal_emit (browser, dmap_mdns_browser_signals [SERVICE_REMOVED], 0, service);
-            free_service (service);
-            browser->priv->services = g_slist_remove_link (browser->priv->services, walk);
-            break;
-        }
-    }
+    g_signal_emit (browser,
+   		   dmap_mdns_browser_signals [SERVICE_REMOVED],
+		   0,
+		   service_name);
 }
 
 static void
diff --git a/libdmapsharing/dmap-mdns-browser-howl.c b/libdmapsharing/dmap-mdns-browser-howl.c
index df78761..bb703b1 100644
--- a/libdmapsharing/dmap-mdns-browser-howl.c
+++ b/libdmapsharing/dmap-mdns-browser-howl.c
@@ -300,17 +300,10 @@ static void
 browser_remove_service (DMAPMdnsBrowser *browser,
                         const char *service_name)
 {
-    GSList *walk;
-    DMAPMdnsBrowserService *service;
-    for (walk = browser->priv->services; walk; walk = walk->next) {
-        service = (DMAPMdnsBrowserService *) walk->data;
-        if (g_ascii_strcasecmp (service->service_name, service_name) == 0) {
-            g_signal_emit (browser, dmap_mdns_browser_signals [SERVICE_REMOVED], 0, service);
-            free_service (service);
-            browser->priv->services = g_slist_remove_link (browser->priv->services, walk);
-            break;
-        }
-    }
+    g_signal_emit (browser,
+   		   dmap_mdns_browser_signals [SERVICE_REMOVED],
+		   0,
+		   service_name);
 }
 
 static sw_result



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]