mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 15:06:14 +01:00
g_network_address_parse: deprecate symbolic port names
(which shouldn't ever have been part of the API. Grr.) Solaris /etc/services doesn't even have "http", which was causing tests/network-address to fail...
This commit is contained in:
parent
af2a905e54
commit
4a371c2ce5
@ -279,8 +279,7 @@ g_network_address_new (const gchar *hostname,
|
||||
* address, an IPv4 address, or a domain name (in which case a DNS
|
||||
* lookup is performed). Quoting with [] is supported for all address
|
||||
* types. A port override may be specified in the usual way with a
|
||||
* colon. Ports may be given as decimal numbers or symbolic names (in
|
||||
* which case an /etc/services lookup is performed).
|
||||
* colon.
|
||||
*
|
||||
* If no port is specified in @host_and_port then @default_port will be
|
||||
* used as the port number to connect to.
|
||||
@ -289,6 +288,11 @@ g_network_address_new (const gchar *hostname,
|
||||
* (allowing them to give the hostname, and a port overide if necessary)
|
||||
* and @default_port is expected to be provided by the application.
|
||||
*
|
||||
* (The port component of @host_and_port can also be specified as a
|
||||
* service name rather than as a numeric port, but this functionality
|
||||
* is deprecated, because it depends on the contents of /etc/services,
|
||||
* which is generally quite sparse on platforms other than Linux.)
|
||||
*
|
||||
* Return value: (transfer full): the new #GNetworkAddress, or %NULL on error
|
||||
*
|
||||
* Since: 2.22
|
||||
|
@ -34,7 +34,6 @@ static ParseTest tests[] =
|
||||
{
|
||||
{ "www.gnome.org", "www.gnome.org", 1234, -1 },
|
||||
{ "www.gnome.org:8080", "www.gnome.org", 8080, -1 },
|
||||
{ "www.gnome.org:http", "www.gnome.org", 80, -1 },
|
||||
{ "[2001:db8::1]", "2001:db8::1", 1234, -1 },
|
||||
{ "[2001:db8::1]:888", "2001:db8::1", 888, -1 },
|
||||
{ "[hostname", NULL, 0, G_IO_ERROR_INVALID_ARGUMENT },
|
||||
|
Loading…
Reference in New Issue
Block a user