ginetaddress: Scope ID parsing is not supported on win32

getaddrinfo doesn't parse it on Windows. This could be replaced by more manual parsing in the future.
This commit is contained in:
Patrick Griffis
2025-07-07 11:24:11 -05:00
parent b40194865a
commit 7e85ae9d5f
3 changed files with 10 additions and 2 deletions

View File

@@ -53,9 +53,11 @@ test_parse (void)
addr = g_inet_address_new_from_string ("204.152.189.116");
g_assert (addr != NULL);
g_object_unref (addr);
#ifndef G_OS_WIN32
addr = g_inet_address_new_from_string ("::1%0");
g_assert (addr != NULL);
g_object_unref (addr);
#endif
addr = g_inet_address_new_from_string ("::1::2");
g_assert (addr == NULL);
@@ -209,11 +211,12 @@ test_socket_address (void)
g_object_unref (saddr);
addr = g_inet_address_new_from_string ("::1%25");
addr = g_inet_address_new_from_string ("::1");
saddr = G_INET_SOCKET_ADDRESS (g_object_new (G_TYPE_INET_SOCKET_ADDRESS,
"address", addr,
"port", 308,
"flowinfo", 10,
"scope-id", 25,
NULL));
g_object_unref (addr);