pike.git / lib / modules / Protocols.pmod / DNS.pmod

version» Context lines:

pike.git/lib/modules/Protocols.pmod/DNS.pmod:1: - // $Id: DNS.pmod,v 1.82 2004/04/13 13:14:19 grubba Exp $ + // $Id: DNS.pmod,v 1.83 2004/09/15 19:59:10 grubba Exp $   // Not yet finished -- Fredrik Hubinette      //! Domain Name System   //! RFC 1035      #pike __REAL_VERSION__      constant NOERROR=0;   constant FORMERR=1;   constant SERVFAIL=2;
pike.git/lib/modules/Protocols.pmod/DNS.pmod:688:       if (!resolv_conf) {    if (System->get_netinfo_property) {    // Mac OS X / Darwin (and possibly other systems) that use    // NetInfo may have these values in the database.    if (nameservers =    System->get_netinfo_property(".",    "/locations/resolver",    "nameserver")) {    nameservers = map(nameservers, `-, "\n"); +  } else { +  nameservers = ({});    }       if (domains = System->get_netinfo_property(".",    "/locations/resolver",    "domain")) {    domains = map(domains, `-, "\n"); -  +  } else { +  domains = ({});    }    } else {    /* FIXME: Is this a good idea?    * Why not just try the fallback?    * /grubba 1999-04-14    *    * Now uses 127.0.0.1 as fallback.    * /grubba 2000-10-17    */    resolv_conf = "nameserver 127.0.0.1";