Branch: Tag:

1999-04-14

1999-04-14 16:45:07 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Some cleanups and a bugfix in client->create().

Rev: lib/modules/Protocols.pmod/DNS.pmod:1.29

278:    if(!server)    {    string domain; - #if __NT__ +     -  + #if __NT__    domain=get_tcpip_param("Domain");    nameservers = ({ get_tcpip_param("NameServer") });    domains=get_tcpip_param("SearchList") / " "- ({""});
291:    break;       if (!resolv_conf) { +  /* FIXME: Is this a good idea? +  * Why not just try the fallback? +  * /grubba 1999-04-14 +  */    throw(({ "Protocols.DNS.client(): No /etc/resolv.conf!\n",    backtrace() }));    }
308:    {    case "domain":    // Save domain for later. -  domain = rest; +  domain = sizeof(rest) && rest;    break;    case "search":    rest = replace(rest, "\t", " "); -  foreach(rest / " " - ({""}), string dom) -  domains += ({dom}); +  domains += ((rest/" ") - ({""}));    break;       case "nameserver":
327:    }    }    if (sizeof(rest)) { -  nameservers = `+(nameservers, ({ rest })); +  nameservers += ({ rest });    }    break;    }    }   #endif    if (!sizeof(nameservers)) { -  +  /* Try localhost... */    nameservers = ({ "127.0.0.1" });    }    if(domain)