From 3847add9436ce2eb080b9a91dd6955603ac6a714 Mon Sep 17 00:00:00 2001 From: Krishna Rajendran Date: Tue, 16 Mar 2010 04:18:21 -0400 Subject: [PATCH] Fix calls to dns bindings in dns.js --- lib/dns.js | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/dns.js b/lib/dns.js index dd3770e0fe..cd7bc817d3 100644 --- a/lib/dns.js +++ b/lib/dns.js @@ -1,4 +1,4 @@ -process.binding('dns'); +var dns = process.binding('dns'); exports.resolve = function (domain, type_, callback_) { var type, callback; @@ -19,32 +19,32 @@ exports.resolve = function (domain, type_, callback_) { } } -exports.resolve4 = process.dns.resolve4; -exports.resolve6 = process.dns.resolve6; -exports.resolveMx = process.dns.resolveMx; -exports.resolveTxt = process.dns.resolveTxt; -exports.resolveSrv = process.dns.resolveSrv; -exports.reverse = process.dns.reverse; +exports.resolve4 = dns.resolve4; +exports.resolve6 = dns.resolve6; +exports.resolveMx = dns.resolveMx; +exports.resolveTxt = dns.resolveTxt; +exports.resolveSrv = dns.resolveSrv; +exports.reverse = dns.reverse; // ERROR CODES // timeout, SERVFAIL or similar. -exports.TEMPFAIL = process.dns.TEMPFAIL; +exports.TEMPFAIL = dns.TEMPFAIL; // got garbled reply. -exports.PROTOCOL = process.dns.PROTOCOL; +exports.PROTOCOL = dns.PROTOCOL; // domain does not exists. -exports.NXDOMAIN = process.dns.NXDOMAIN; +exports.NXDOMAIN = dns.NXDOMAIN; // domain exists but no data of reqd type. -exports.NODATA = process.dns.NODATA; +exports.NODATA = dns.NODATA; // out of memory while processing. -exports.NOMEM = process.dns.NOMEM; +exports.NOMEM = dns.NOMEM; // the query is malformed. -exports.BADQUERY = process.dns.BADQUERY; +exports.BADQUERY = dns.BADQUERY; var resolveMap = { 'A': exports.resolve4,