From b8998128ea920d321c78a447601184d918923623 Mon Sep 17 00:00:00 2001 From: Gregor Schneider Date: Sun, 25 Apr 2010 10:47:10 +0000 Subject: [PATCH] [NETCFGX] - Save DHCP and DNS settings from the basic TCP/IP panel independently of each other See issue #5193 for more details. svn path=/trunk/; revision=47010 --- reactos/dll/win32/netcfgx/tcpipconf_notify.c | 34 +++++++++++--------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/reactos/dll/win32/netcfgx/tcpipconf_notify.c b/reactos/dll/win32/netcfgx/tcpipconf_notify.c index e582da43f96..14b9a4ab2f4 100644 --- a/reactos/dll/win32/netcfgx/tcpipconf_notify.c +++ b/reactos/dll/win32/netcfgx/tcpipconf_notify.c @@ -3280,23 +3280,25 @@ INetCfgComponentControl_fnApplyRegistryChanges( RegSetValueExW(hKey, L"DefaultGateway", 0, REG_MULTI_SZ, (LPBYTE)L"", 1 * sizeof(WCHAR)); RegSetValueExW(hKey, L"DefaultGatewayMetric", 0, REG_MULTI_SZ, (LPBYTE)L"\0", sizeof(WCHAR) * 2); } - - if (!pCurrentConfig->Ns || pCurrentConfig->AutoconfigActive) - { - RegSetValueExW(hKey, L"NameServer", 0, REG_SZ, (LPBYTE)L"", 1 * sizeof(WCHAR)); - } - else - { - pStr = CreateMultiSzString(pCurrentConfig->Ns, IPADDR, &dwSize, TRUE); - if(pStr) - { - RegSetValueExW(hKey, L"NameServer", 0, REG_SZ, (LPBYTE)pStr, dwSize); - RegDeleteValueW(hKey, L"DhcpNameServer"); - CoTaskMemFree(pStr); - } - } - RegCloseKey(hKey); } + + if (!pCurrentConfig->Ns || pCurrentConfig->AutoconfigActive) + { + RegSetValueExW(hKey, L"NameServer", 0, REG_SZ, (LPBYTE)L"", 1 * sizeof(WCHAR)); + } + else + { + pStr = CreateMultiSzString(pCurrentConfig->Ns, IPADDR, &dwSize, TRUE); + if(pStr) + { + + RegSetValueExW(hKey, L"NameServer", 0, REG_SZ, (LPBYTE)pStr, dwSize); + RegDeleteValueW(hKey, L"DhcpNameServer"); + CoTaskMemFree(pStr); + } + } + + RegCloseKey(hKey); } return S_OK; }