Changeset 18239 in vbox for trunk/src/VBox/Devices/Network
- Timestamp:
- Mar 25, 2009 7:49:45 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/slirp/slirp.c
r18226 r18239 11 11 # include <poll.h> 12 12 #else 13 # include <Winnls.h> 13 14 # define _WINSOCK2API_ 14 15 # include <IPHlpApi.h> … … 332 333 PIP_ADAPTER_DNS_SERVER_ADDRESS dns = NULL; 333 334 ULONG size = 0; 335 int wlen = 0; 334 336 char *suffix; 335 337 struct dns_entry *da = NULL; … … 395 397 dns = dns->Next; 396 398 } 399 #if 1 397 400 buff_size = wcstombs(NULL, addr->DnsSuffix, 0); 398 401 if (buff_size == 0 || buff_size == (size_t)-1) … … 400 403 suffix = RTMemAllocZ(buff_size + 1); 401 404 wcstombs(suffix, addr->DnsSuffix, buff_size); 405 suffix[buff_size] = '\0'; 402 406 LogRel(("NAT: adding %s to DNS suffix list\n", suffix)); 407 #else 408 /*Probably more correct way but not working */ 409 buff_size = WideCharToMultiByte(CP_ACP, 0, addr->DnsSuffix, -1, NULL, 0, NULL, NULL); 410 suffix = RTMemAllocZ(buff_size); 411 WideCharToMultiByte(CP_ACP, 0, addr->DnsSuffix, -1, suffix, buff_size, NULL, NULL); 412 #endif 403 413 *ppszDomain = suffix; 404 414 next:
Note:
See TracChangeset
for help on using the changeset viewer.