[gssdp] Revert "browser: Rewrite link-local locations"



commit f0717ba501d29ae28508c73da4ffc54ec68cfc68
Author: Jens Georg <mail jensge org>
Date:   Mon Nov 19 20:37:33 2018 +0100

    Revert "browser: Rewrite link-local locations"
    
    This reverts commit 93bb6a94cb6eccbfa350924c144e85a5fc984933.

 libgssdp/gssdp-resource-browser.c | 36 ++----------------------------------
 1 file changed, 2 insertions(+), 34 deletions(-)
---
diff --git a/libgssdp/gssdp-resource-browser.c b/libgssdp/gssdp-resource-browser.c
index eae064b..467cc0d 100644
--- a/libgssdp/gssdp-resource-browser.c
+++ b/libgssdp/gssdp-resource-browser.c
@@ -730,40 +730,8 @@ resource_available (GSSDPResourceBrowser *resource_browser,
         destroyLocations = TRUE;
 
         header = soup_message_headers_get_one (headers, "Location");
-        if (header) {
-                GSocketFamily family;
-                GSSDPClient *client;
-
-                client = priv->client;
-                family = gssdp_client_get_family (client);
-
-                if (family == G_SOCKET_FAMILY_IPV6) {
-                        SoupURI *uri = soup_uri_new (header);
-                        const char *host = NULL;
-                        GInetAddress *addr = NULL;
-
-                        host = soup_uri_get_host (uri);
-                        addr = g_inet_address_new_from_string (host);
-                        if (g_inet_address_get_is_link_local (addr)) {
-                                char *new_host;
-                                int index = 0;
-
-                                index = gssdp_client_get_index (client);
-
-                                new_host = g_strdup_printf ("%s%%%d",
-                                                            host,
-                                                            index);
-                                soup_uri_set_host (uri, new_host);
-                        }
-                        g_object_unref (addr);
-                        locations = g_list_append (locations,
-                                                   soup_uri_to_string (uri,
-                                                                       FALSE));
-                        soup_uri_free (uri);
-                } else {
-                        locations = g_list_append (locations, g_strdup (header));
-                }
-        }
+        if (header)
+                locations = g_list_append (locations, g_strdup (header));
 
         header = soup_message_headers_get_one (headers, "AL");
         if (header) {


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