[gupnp/wip/ipv6-everywhere: 4/4] Windows CM: Pre-filter address family




commit 059ff52c3d59384ebfb077463faf44338ff9a973
Author: Jens Georg <mail jensge org>
Date:   Mon Jun 20 00:07:30 2022 +0200

    Windows CM: Pre-filter address family
    
    Together with the changes in SimpleCM, this should enable v6 support in
    Windows.

 libgupnp/gupnp-windows-context-manager.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/libgupnp/gupnp-windows-context-manager.c b/libgupnp/gupnp-windows-context-manager.c
index 662c009..b7af31a 100644
--- a/libgupnp/gupnp-windows-context-manager.c
+++ b/libgupnp/gupnp-windows-context-manager.c
@@ -61,9 +61,12 @@ gupnp_windows_context_manager_get_interfaces
         PIP_ADAPTER_ADDRESSES adapters_addresses;
         PIP_ADAPTER_ADDRESSES adapter;
 
+        ULONG family = gupnp_context_manager_get_socket_family (
+                GUPNP_CONTEXT_MANAGER (manager));
+
         do {
                 adapters_addresses = (PIP_ADAPTER_ADDRESSES) g_malloc0 (size);
-                ret = GetAdaptersAddresses (AF_UNSPEC,
+                ret = GetAdaptersAddresses (family,
                                             flags,
                                             NULL,
                                             adapters_addresses,


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