Fix IPv6 parsing in _g_uri_parse_authority, add _g_uri_from_authority

Fixes connections to IPv6 address literals.

https://bugzilla.gnome.org/show_bug.cgi?id=629259
This commit is contained in:
Dan Winship
2010-09-10 08:51:21 -04:00
parent f8cb2a60b9
commit 59383c8bea
4 changed files with 56 additions and 8 deletions

View File

@@ -372,7 +372,7 @@ g_socket_address_connectable_proxy_enumerate (GSocketConnectable *connectable)
g_object_get (connectable, "address", &addr, "port", &port, NULL);
ip = g_inet_address_to_string (addr);
uri = g_strdup_printf ("none://%s:%u", ip, port);
uri = _g_uri_from_authority ("none", ip, port, NULL);
addr_enum = g_object_new (G_TYPE_PROXY_ADDRESS_ENUMERATOR,
"connectable", connectable,