Commit 128fd741 authored by Jens Georg's avatar Jens Georg
Browse files

Also disable managed RootDevices on WL change

The white-list change listener only handles control points currently.
parent 4ad119c7
......@@ -177,20 +177,19 @@ gupnp_context_manager_filter_context (GUPnPWhiteList *white_list,
GList *obj;
GList *blk;
gboolean match;
GUPnPContext *context;
GSSDPResourceBrowser *browser;
obj = manager->priv->objects;
blk = manager->priv->blacklisted;
while (obj != NULL) {
if (!GUPNP_IS_CONTROL_POINT (obj->data))
/* If the white list is empty, treat it as disabled */
if (check) {
/* Filter out context */
context = gupnp_control_point_get_context (obj->data);
GUPnPContext *context;
g_object_get (G_OBJECT (obj->data),
"context", &context,
match = gupnp_white_list_check_context (white_list,
} else {
......@@ -198,8 +197,18 @@ gupnp_context_manager_filter_context (GUPnPWhiteList *white_list,
match = TRUE;
browser = GSSDP_RESOURCE_BROWSER (obj->data);
gssdp_resource_browser_set_active (browser, match);
if (GUPNP_IS_CONTROL_POINT (obj->data)) {
GSSDPResourceBrowser *browser;
browser = GSSDP_RESOURCE_BROWSER (obj->data);
gssdp_resource_browser_set_active (browser, match);
} else if (GUPNP_IS_ROOT_DEVICE (obj->data)) {
GSSDPResourceGroup *group;
group = GSSDP_RESOURCE_GROUP (obj->data);
gssdp_resource_group_set_available (group, match);
} else
g_assert_not_reached ();
obj = obj->next;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment