summaryrefslogtreecommitdiff
path: root/lib/dns.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/dns.js')
-rw-r--r--lib/dns.js20
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/dns.js b/lib/dns.js
index f3b86a471d..ac3f6d6f0e 100644
--- a/lib/dns.js
+++ b/lib/dns.js
@@ -152,21 +152,21 @@ Object.defineProperty(lookup, customPromisifyArgs,
{ value: ['address', 'family'], enumerable: false });
-function onlookupservice(err, host, service) {
+function onlookupservice(err, hostname, service) {
if (err)
- return this.callback(dnsException(err, 'getnameinfo', this.host));
+ return this.callback(dnsException(err, 'getnameinfo', this.hostname));
- this.callback(null, host, service);
+ this.callback(null, hostname, service);
}
// lookupService(address, port, callback)
-function lookupService(host, port, callback) {
+function lookupService(hostname, port, callback) {
if (arguments.length !== 3)
- throw new ERR_MISSING_ARGS('host', 'port', 'callback');
+ throw new ERR_MISSING_ARGS('hostname', 'port', 'callback');
- if (isIP(host) === 0)
- throw new ERR_INVALID_OPT_VALUE('host', host);
+ if (isIP(hostname) === 0)
+ throw new ERR_INVALID_OPT_VALUE('hostname', hostname);
if (!isLegalPort(port))
throw new ERR_SOCKET_BAD_PORT(port);
@@ -178,12 +178,12 @@ function lookupService(host, port, callback) {
var req = new GetNameInfoReqWrap();
req.callback = callback;
- req.host = host;
+ req.hostname = hostname;
req.port = port;
req.oncomplete = onlookupservice;
- var err = cares.getnameinfo(req, host, port);
- if (err) throw dnsException(err, 'getnameinfo', host);
+ var err = cares.getnameinfo(req, hostname, port);
+ if (err) throw dnsException(err, 'getnameinfo', hostname);
return req;
}