[gupnp] service-info: Properly rewrite the SCPD url
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gupnp] service-info: Properly rewrite the SCPD url
- Date: Fri, 3 Jun 2022 08:52:52 +0000 (UTC)
commit fa4ddc6fb9ce650b8a4dd908d22aec27d93fe727
Author: Jens Georg <mail jensge org>
Date: Fri Jun 3 10:51:22 2022 +0200
service-info: Properly rewrite the SCPD url
Otherwise introspection will fail for link-local
libgupnp/gupnp-service-info.c | 8 ++++++--
1 file 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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]