Branch: Tag:

1998-06-13

1998-06-13 19:31:23 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Made rec_data() more paranoid.

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

525:       static private void rec_data()    { +  mixed err; +  if (err = catch {    mapping m=udp::read();    if(m->port != 53 || search(nameservers, m->ip) == -1) return;    sscanf(m->data,"%2c",int id);
533:    m_delete(requests,id);    r->callback(r->domain,decode_res(m->data),@r->args);    destruct(r); +  }) { +  werror(sprintf("DNS: Failed to read UDP packet. Connection refused?\n" +  "%s\n", +  describe_backtrace(err)));    } -  +  }       static private void generic_get(string d,    mapping answer,