VirtualBox

Changeset 19689 in vbox for trunk/src/VBox/Devices/Network


Ignore:
Timestamp:
May 14, 2009 11:47:12 AM (16 years ago)
Author:
vboxsync
Message:

NAT: debug give slirp custom resolv.conf for debug need

File:
1 edited

Legend:

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

    r19525 r19689  
    431431    char buff[512];
    432432    char buff2[256];
    433     FILE *f;
     433    FILE *f = NULL;
    434434    int found = 0;
    435435    struct in_addr tmp_addr;
     
    438438    /* Try various locations. */
    439439    char *etc = getenv("ETC");
    440     f = NULL;
    441440    if (etc)
    442441    {
     
    455454    }
    456455#else
     456#ifndef DEBUG_vvl
    457457    f = fopen("/etc/resolv.conf", "r");
     458#else
     459    char *home = getenv("HOME");
     460    snprintf(buff, sizeof(buff), "%s/resolv.conf", home);
     461    f = fopen(buff, "r");
     462    if (f != NULL)
     463    {
     464        Log(("NAT: DNS we're using %s\n", buff));
     465    }
     466    else
     467    {
     468        f = fopen("/etc/resolv.conf", "r");
     469        Log(("NAT: DNS we're using %s\n", buff));
     470    }
     471#endif
    458472#endif
    459473    if (!f)
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