diff options
author | Jens Georg <mail@jensge.org> | 2018-11-20 23:15:48 +0100 |
---|---|---|
committer | Jens Georg <mail@jensge.org> | 2018-11-20 23:15:48 +0100 |
commit | 0e2de02a4fa36936e66102b858099db05e5e95f3 (patch) | |
tree | 3fe3ec49ac7d93373b22d89f25450709087e68d3 | |
parent | 4bb034aceb48936e6a25d8060a8578361de1e42f (diff) | |
download | gupnp-tools-wip/new-upnp.tar.gz |
av-cp: Rewrite URI for getting device iconswip/new-upnp
-rw-r--r-- | src/common/icons.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/common/icons.c b/src/common/icons.c index 51a986b..3419f8d 100644 --- a/src/common/icons.c +++ b/src/common/icons.c @@ -167,14 +167,17 @@ schedule_icon_update (GUPnPDeviceInfo *info, return; } - data->message = soup_message_new (SOUP_METHOD_GET, icon_url); + char *new_uri = gupnp_context_rewrite_uri (gupnp_device_info_get_context (info), icon_url); + g_free (icon_url); + + data->message = soup_message_new (SOUP_METHOD_GET, new_uri); if (data->message == NULL) { g_warning ("Invalid URL icon for device '%s': %s", gupnp_device_info_get_udn (info), - icon_url); + new_uri); - g_free (icon_url); + g_free (new_uri); g_free (data->mime_type); g_idle_add (on_icon_schedule_error, data); @@ -187,7 +190,7 @@ schedule_icon_update (GUPnPDeviceInfo *info, (SoupSessionCallback) got_icon_url, data); - g_free (icon_url); + g_free (new_uri); } void |