[gupnp] context-manager: Fix white-list for control points



commit 8c32467ce9adab2165aa363d92ea101835eae52c
Author: Jens Georg <mail jensge org>
Date:   Sun Jan 13 18:57:32 2019 +0100

    context-manager: Fix white-list for control points
    
    The control point derives from GSSDPResourceBrowser, thus the property
    to access the context is "client", not "context"

 libgupnp/gupnp-context-manager.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/libgupnp/gupnp-context-manager.c b/libgupnp/gupnp-context-manager.c
index 2e6ba93..9a69483 100644
--- a/libgupnp/gupnp-context-manager.c
+++ b/libgupnp/gupnp-context-manager.c
@@ -203,9 +203,14 @@ gupnp_context_manager_filter_context (GUPnPWhiteList *white_list,
                 /* If the white list is empty, treat it as disabled */
                 if (check) {
                         GUPnPContext *context;
+                        const char *property = "context";
+
+                        if (GUPNP_IS_CONTROL_POINT (obj->data)) {
+                                property = "client";
+                        }
 
                         g_object_get (G_OBJECT (obj->data),
-                                      "context", &context,
+                                      property, &context,
                                       NULL);
 
                         match = gupnp_white_list_check_context (white_list,


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