Branch: Tag:

2013-09-18

2013-09-18 19:07:03 by Martin Nilsson <nilsson@opera.com>

Whitespace changes and changed Array.map to map.

15:   //! No error condition.   final constant NOERROR=0;    - //! The name server was unable to interpret the request due to a format error. + //! The name server was unable to interpret the request due to a + //! format error.   final constant FORMERR=1;    - //!The name server encountered an internal failure while processing this request, for example an operating system error or a forwarding timeout. + //! The name server encountered an internal failure while processing + //! this request, for example an operating system error or a + //! forwarding timeout.   final constant SERVFAIL=2;      //! Some name that ought to exist, does not exist.
27:   //! The name server does not support the specified Opcode.   final constant NOTIMPL=4;    - //! The name server refuses to perform the specified operation for policy or security reasons. + //! The name server refuses to perform the specified operation for + //! policy or security reasons.   final constant REFUSED=5;      //! Some RRset that ought to exist, does not exist.
231:    return rnaptr;       case T_TXT: -  return Array.map(stringp(entry->txt)? ({entry->txt}):(entry->txt||({})), +  return map(stringp(entry->txt)? ({entry->txt}):(entry->txt||({})),    lambda(string t) {    return sprintf("%1H", t);    })*"";    case T_SPF: -  return Array.map(stringp(entry->spf)? ({entry->spf}):(entry->spf||({})), +  return map(stringp(entry->spf)? ({entry->spf}):(entry->spf||({})),    lambda(string t) {    return sprintf("%1H", t);    })*"";
304:   //! @param cl   //! record class such as Protocols.DNS.C_IN   //! @param type - //! query type such Protocols.DNS.T_A +  //! query type such Protocols.DNS.T_A   //!   //! @returns   //! data suitable for use with
1090:    }       port->set_id(port); -  // port objects are stored for destruction when the server object is destroyed. +  // Port objects are stored for destruction when the server +  // object is destroyed.    ports += ({ port });    }    }
1116:       if (!con->tcp_connection) {    if (sizeof(rpl) > 512) { -  rpl = sprintf("%s%8c", rpl[..3], 0); // truncate after header and +  rpl = sprintf("%s%8c", rpl[..3], 0); // Truncate after header and    // send empty response    // ("dnscache strategy") -  rpl[2] |= 2; // set TC bit +  rpl[2] |= 2; // Set TC bit    }    con->send(m->ip, m->port, rpl);    } else
1141:   #define RETRIES 12   #define RETRY_DELAY 5    - //! Synchronous DNS client. + //! Synchronous DNS client.   class client   {    inherit protocol;
1373:    nameservers = ({ "127.0.0.1" });    }    domains -= ({ "" }); -  domains = Array.map(domains, lambda(string d) { +  domains = map(domains, lambda(string d) {    if (d[-1] == '.') {    return d[..<1];    }
1400:   //! @param s   //! Result of @[Protocols.DNS.protocol.mkquery]   //! @returns - //! mapping containing query result or 0 on failure/timeout +  //! mapping containing query result or 0 on failure/timeout   //!   //! @example   //! @code
1594:    }       array res=({}); -  +     foreach(m->an, mapping x)    {    res+=({({x->priority, x->weight, x->port, x->target})});