diff options
author | Jens Georg <mail@jensge.org> | 2022-06-03 10:51:22 +0200 |
---|---|---|
committer | Jens Georg <mail@jensge.org> | 2022-06-03 10:51:22 +0200 |
commit | fa4ddc6fb9ce650b8a4dd908d22aec27d93fe727 (patch) | |
tree | 592d31fc3bdf4b42aa52eef805ea483707b07c5b /libgupnp | |
parent | 935efb3f7398d7eff6c6dd972fa964405b512fdc (diff) | |
download | gupnp-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.c | 8 |
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, |