Module: wine Branch: master Commit: 8d3318a8ff38e43e9ecfb3aff02dcd6ef29dc29f URL: http://source.winehq.org/git/wine.git/?a=commit;h=8d3318a8ff38e43e9ecfb3aff0...
Author: Juan Lang juan.lang@gmail.com Date: Mon Oct 11 08:54:47 2010 -0700
ipconfig: Specify GAA_FLAG_INCLUDE_ALL_GATEWAYS when calling GetAdaptersAddresses.
---
programs/ipconfig/ipconfig.c | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/programs/ipconfig/ipconfig.c b/programs/ipconfig/ipconfig.c index e76b549..b6eb5f0 100644 --- a/programs/ipconfig/ipconfig.c +++ b/programs/ipconfig/ipconfig.c @@ -153,13 +153,15 @@ static void print_basic_information(void) IP_ADAPTER_ADDRESSES *adapters; ULONG out = 0;
- if (GetAdaptersAddresses(AF_UNSPEC, 0, NULL, NULL, &out) == ERROR_BUFFER_OVERFLOW) + if (GetAdaptersAddresses(AF_UNSPEC, GAA_FLAG_INCLUDE_ALL_GATEWAYS, + NULL, NULL, &out) == ERROR_BUFFER_OVERFLOW) { adapters = HeapAlloc(GetProcessHeap(), 0, out); if (!adapters) exit(1);
- if (GetAdaptersAddresses(AF_UNSPEC, 0, NULL, adapters, &out) == ERROR_SUCCESS) + if (GetAdaptersAddresses(AF_UNSPEC, GAA_FLAG_INCLUDE_ALL_GATEWAYS, + NULL, adapters, &out) == ERROR_SUCCESS) { IP_ADAPTER_ADDRESSES *p;
@@ -303,13 +305,15 @@ static void print_full_information(void) HeapFree(GetProcessHeap(), 0, info); }
- if (GetAdaptersAddresses(AF_UNSPEC, 0, NULL, NULL, &out) == ERROR_BUFFER_OVERFLOW) + if (GetAdaptersAddresses(AF_UNSPEC, GAA_FLAG_INCLUDE_ALL_GATEWAYS, + NULL, NULL, &out) == ERROR_BUFFER_OVERFLOW) { adapters = HeapAlloc(GetProcessHeap(), 0, out); if (!adapters) exit(1);
- if (GetAdaptersAddresses(AF_UNSPEC, 0, NULL, adapters, &out) == ERROR_SUCCESS) + if (GetAdaptersAddresses(AF_UNSPEC, GAA_FLAG_INCLUDE_ALL_GATEWAYS, + NULL, adapters, &out) == ERROR_SUCCESS) { IP_ADAPTER_ADDRESSES *p;