summaryrefslogtreecommitdiff
path: root/libgupnp
diff options
context:
space:
mode:
authorJens Georg <mail@jensge.org>2022-06-03 10:51:22 +0200
committerJens Georg <mail@jensge.org>2022-06-03 10:51:22 +0200
commitfa4ddc6fb9ce650b8a4dd908d22aec27d93fe727 (patch)
tree592d31fc3bdf4b42aa52eef805ea483707b07c5b /libgupnp
parent935efb3f7398d7eff6c6dd972fa964405b512fdc (diff)
downloadgupnp-fa4ddc6fb9ce650b8a4dd908d22aec27d93fe727.tar.gz
service-info: Properly rewrite the SCPD url
Otherwise introspection will fail for link-local
Diffstat (limited to 'libgupnp')
-rw-r--r--libgupnp/gupnp-service-info.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libgupnp/gupnp-service-info.c b/libgupnp/gupnp-service-info.c
index 517e729..4752c3d 100644
--- a/libgupnp/gupnp-service-info.c
+++ b/libgupnp/gupnp-service-info.c
@@ -621,9 +621,13 @@ gupnp_service_info_introspect_async (GUPnPServiceInfo *info,
return;
}
-
- SoupMessage *message = soup_message_new (SOUP_METHOD_GET, scpd_url);
+ GUPnPContext *context = gupnp_service_info_get_context (info);
+ GUri *scpd = gupnp_context_rewrite_uri_to_uri (context, scpd_url);
g_free (scpd_url);
+
+ SoupMessage *message = soup_message_new_from_uri (SOUP_METHOD_GET, scpd);
+ g_uri_unref (scpd);
+
if (message == NULL) {
g_task_return_new_error (task,
GUPNP_SERVER_ERROR,