[grilo-plugins] upnp: use gupnp_control_point_new() filtering



commit 50989d3b6cdef3c7bb72a6e3162748b68e300559
Author: Jussi Kukkonen <jku linux intel com>
Date:   Thu Jan 13 13:53:44 2011 +0200

    upnp: use gupnp_control_point_new() filtering
    
    target param lets us filter in GSSDP, so we don't need to do it in
    device_available_cb().
    
    Signed-off-by: Iago Toral Quiroga <itoral igalia com>

 src/upnp/grl-upnp.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)
---
diff --git a/src/upnp/grl-upnp.c b/src/upnp/grl-upnp.c
index 02ae960..1bdb320 100644
--- a/src/upnp/grl-upnp.c
+++ b/src/upnp/grl-upnp.c
@@ -333,7 +333,7 @@ context_available_cb (GUPnPContextManager *context_manager,
 
   GRL_DEBUG ("%s", __func__);
 
-  cp = gupnp_control_point_new (context, "ssdp:all");
+  cp = gupnp_control_point_new (context, "urn:schemas-upnp-org:device:MediaServer:1");
   g_signal_connect (cp,
 		    "device-proxy-available",
 		    G_CALLBACK (device_available_cb),
@@ -366,10 +366,6 @@ device_available_cb (GUPnPControlPoint *cp,
 
   type = gupnp_device_info_get_device_type (GUPNP_DEVICE_INFO (device));
   GRL_DEBUG ("  type: %s", type);
-  if (!g_pattern_match_simple ("urn:schemas-upnp-org:device:MediaServer:*",
-			       type)) {
-    return;
-  }
 
   service = gupnp_device_info_get_service (GUPNP_DEVICE_INFO (device),
 					   CONTENT_DIR_SERVICE);



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