Branch: Tag:

2003-08-07

2003-08-07 14:27:02 by Martin Nilsson <mani@lysator.liu.se>

Don't use search for has_value

Rev: lib/modules/Filesystem.pmod/System.pike:1.15
Rev: lib/modules/Graphics.pmod/Graph.pmod/create_graph.pike:1.10
Rev: lib/modules/Protocols.pmod/DNS.pmod:1.79
Rev: lib/modules/Protocols.pmod/HTTP.pmod/Query.pike:1.61
Rev: lib/modules/Protocols.pmod/LysKOM.pmod/Raw.pike:1.16
Rev: lib/modules/Protocols.pmod/SMTP.pmod:1.23
Rev: lib/modules/Protocols.pmod/SNMP.pmod/agent.pike:1.5
Rev: lib/modules/Protocols.pmod/TELNET.pmod:1.21
Rev: lib/modules/SSL.pmod/handshake.pike:1.34
Rev: lib/modules/Stdio.pmod/Terminfo.pmod:1.18

1: - // $Id: DNS.pmod,v 1.78 2003/08/05 18:04:35 nilsson Exp $ + // $Id: DNS.pmod,v 1.79 2003/08/07 14:22:17 nilsson Exp $   // Not yet finished -- Fredrik Hubinette      //! Domain Name System
791:    m = udp->read();    if ((m->port == 53) &&    (m->data[0..1] == s[0..1]) && -  (search(nameservers, m->ip) != -1)) { +  has_value(nameservers, m->ip)) {    // Success.    return decode_res(m->data);    }
1134:    {    mixed err;    if (err = catch { -  if(m->port != 53 || search(nameservers, m->ip) == -1) return; +  if(m->port != 53 || !has_value(nameservers, m->ip)) return;    sscanf(m->data,"%2c",int id);    object r=requests[id];    if(!r) return;