VirtualBox

Changeset 46765 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Jun 24, 2013 8:17:31 PM (11 years ago)
Author:
vboxsync
Message:

Devices/NAT: reverted accidental extra commit from r86686

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/slirp/libalias/alias_dns.c

    r46758 r46765  
    2727#define isdigit(ch)    RT_C_IS_DIGIT(ch)
    2828#define isalpha(ch)    RT_C_IS_ALPHA(ch)
    29 
    3029
    3130#define DNS_CONTROL_PORT_NUMBER 53
     
    198197    /* Parse dns request */
    199198    char *qw_qname = NULL;
    200     struct {
    201         struct hostent hostnt;
    202         char buffer[1024];
    203     } hostent_with_buffer;
    204     struct hostent *pHostent = &hostent_with_buffer.hostnt;
    205     int rc_hostent = 0;
    206     int h_errnop = 0;
    207 
     199    struct hostent *pHostent = NULL;
    208200    char pszCname[255];
    209201    int cname_len = 0;
     
    253245            pszCname[cname_len - 2] = 0;
    254246        }
    255         rc_hostent = gethostbyname_r(pszCname,
    256                                      &hostent_with_buffer.hostnt,
    257                                      hostent_with_buffer.buffer,
    258                                      1024,
    259                                      &pHostent,
    260                                      &h_errnop);
    261         /* Expected rc_hostent equals to 0, if not 0 and h_errnop == ERANGE
    262          * we need to alloc more memory, for buffer.
    263          */
    264         if (rc_hostent)
    265             return 1;
     247        pHostent = gethostbyname(pszCname);
    266248#ifdef VBOX_WITH_DNSMAPPING_IN_HOSTRESOLVER
    267249        if (   pHostent
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette