aboutsummaryrefslogtreecommitdiffstats
path: root/net/dns.lua
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2010-02-10 00:34:30 +0500
committerWaqas Hussain <waqas20@gmail.com>2010-02-10 00:34:30 +0500
commit588d6d7490da2959afe176375fb91276b314ea2c (patch)
treeda6ac126c71cb539f96713124dab80a9ca2653ed /net/dns.lua
parenta226e93664a30559b01fa4cade8e99f5963ce708 (diff)
downloadprosody-588d6d7490da2959afe176375fb91276b314ea2c.tar.gz
prosody-588d6d7490da2959afe176375fb91276b314ea2c.zip
net.dns: Removed some useless indirection to improve readability.
Diffstat (limited to 'net/dns.lua')
-rw-r--r--net/dns.lua19
1 files changed, 9 insertions, 10 deletions
diff --git a/net/dns.lua b/net/dns.lua
index 01807d9d..f2a3c9be 100644
--- a/net/dns.lua
+++ b/net/dns.lua
@@ -927,37 +927,36 @@ function dns.resolver () -- - - - - - - - - - - - - - - - - - - - - resolver
return r;
end
+local _resolver = dns.resolver();
+dns._resolver = _resolver;
function dns.lookup(...) -- - - - - - - - - - - - - - - - - - - - - lookup
- return resolve(resolver.lookup, ...);
+ return _resolver:lookup(...);
end
function dns.purge(...) -- - - - - - - - - - - - - - - - - - - - - - purge
- return resolve(resolver.purge, ...);
+ return _resolver:purge(...);
end
function dns.peek(...) -- - - - - - - - - - - - - - - - - - - - - - - peek
- return resolve(resolver.peek, ...);
+ return _resolver:peek(...);
end
-
function dns.query(...) -- - - - - - - - - - - - - - - - - - - - - - query
- return resolve(resolver.query, ...);
+ return _resolver:query(...);
end
function dns.feed(...) -- - - - - - - - - - - - - - - - - - - - - - feed
- return resolve(resolver.feed, ...);
+ return _resolver:feed(...);
end
function dns.cancel(...) -- - - - - - - - - - - - - - - - - - - - - - cancel
- return resolve(resolver.cancel, ...);
+ return _resolver:cancel(...);
end
function dns:socket_wrapper_set(...) -- - - - - - - - - socket_wrapper_set
- return resolve(resolver.socket_wrapper_set, ...);
+ return _resolver:socket_wrapper_set(...);
end
-dns._resolver = dns.resolver();
-
return dns;