Skip to content
Snippets Groups Projects
Commit a0122ad6 authored by Martin Nilsson's avatar Martin Nilsson
Browse files

Whitespace changes and changed Array.map to map.

parent a3a007e6
Branches
Tags
No related merge requests found
......@@ -15,10 +15,13 @@
//! 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,7 +30,8 @@ final constant NXDOMAIN=3;
//! 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,12 +235,12 @@ class protocol
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);
})*"";
......@@ -1090,7 +1094,8 @@ class tcp_server
}
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,10 +1121,10 @@ class dual_server {
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
......@@ -1373,7 +1378,7 @@ class client
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];
}
......@@ -1594,7 +1599,6 @@ class client
}
array res=({});
foreach(m->an, mapping x)
{
res+=({({x->priority, x->weight, x->port, x->target})});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment