From b7e51a203d3d95961294c711ae0d9c449ddb040d Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Sat, 16 Oct 2010 23:00:42 +0500 Subject: Monster whitespace commit (beware the whitespace monster). --- net/connlisteners.lua | 4 ++-- net/dns.lua | 18 +++++++++--------- net/http.lua | 10 +++++----- net/httpserver.lua | 6 +++--- net/xmppcomponent_listener.lua | 4 ++-- 5 files changed, 21 insertions(+), 21 deletions(-) (limited to 'net') diff --git a/net/connlisteners.lua b/net/connlisteners.lua index 93dce8b3..e13f85de 100644 --- a/net/connlisteners.lua +++ b/net/connlisteners.lua @@ -13,8 +13,8 @@ local server = require "net.server"; local log = require "util.logger".init("connlisteners"); local tostring = tostring; -local dofile, pcall, error = - dofile, pcall, error +local dofile, pcall, error = + dofile, pcall, error module "connlisteners" diff --git a/net/dns.lua b/net/dns.lua index 29d9cf36..d40174df 100644 --- a/net/dns.lua +++ b/net/dns.lua @@ -674,11 +674,11 @@ function resolver:query(qname, qtype, qclass) -- - - - - - - - - - -- query retry = socket.gettime() + self.delays[1] }; - -- remember the query + -- remember the query self.active[id] = self.active[id] or {}; self.active[id][question] = o; - -- remember which coroutine wants the answer + -- remember which coroutine wants the answer local co = coroutine.running(); if co then set(self.wanted, qclass, qtype, qname, co, true); @@ -738,7 +738,7 @@ function resolver:servfail(sock) end end end - + if num == self.best_server then self.best_server = self.best_server + 1; if self.best_server > #self.server then @@ -887,12 +887,12 @@ end function resolver:lookup(qname, qtype, qclass) -- - - - - - - - - - lookup self:query (qname, qtype, qclass) while self:pulse() do - local recvt = {} - for i, s in ipairs(self.socket) do - recvt[i] = s - end - socket.select(recvt, nil, 4) - end + local recvt = {} + for i, s in ipairs(self.socket) do + recvt[i] = s + end + socket.select(recvt, nil, 4) + end --print(self.cache); return self:peek(qname, qtype, qclass); end diff --git a/net/http.lua b/net/http.lua index 11407c4d..63ae31ad 100644 --- a/net/http.lua +++ b/net/http.lua @@ -19,7 +19,7 @@ local listener = connlisteners_get("httpclient") or error("No httpclient listene local t_insert, t_concat = table.insert, table.concat; local pairs, ipairs = pairs, ipairs; local tonumber, tostring, xpcall, select, debug_traceback, char, format = - tonumber, tostring, xpcall, select, debug.traceback, string.char, string.format; + tonumber, tostring, xpcall, select, debug.traceback, string.char, string.format; local log = require "util.logger".init("http"); @@ -46,10 +46,10 @@ function formencode(form) end local function expectbody(reqt, code) - if reqt.method == "HEAD" then return nil end - if code == 204 or code == 304 or code == 301 then return nil end - if code >= 100 and code < 200 then return nil end - return 1 + if reqt.method == "HEAD" then return nil end + if code == 204 or code == 304 or code == 301 then return nil end + if code >= 100 and code < 200 then return nil end + return 1 end local function request_reader(request, data, startpos) diff --git a/net/httpserver.lua b/net/httpserver.lua index b6a080b6..ca830a5a 100644 --- a/net/httpserver.lua +++ b/net/httpserver.lua @@ -31,7 +31,7 @@ module "httpserver" local default_handler; local function expectbody(reqt) - return reqt.method == "POST"; + return reqt.method == "POST"; end local function send_response(request, response) @@ -212,8 +212,8 @@ function new_from_config(ports, handle_request, default_options) ssl.options = "no_sslv2"; end - new{ port = port, interface = interface, - base = base, handler = handle_request, + new{ port = port, interface = interface, + base = base, handler = handle_request, ssl = ssl, type = (ssl and "ssl") or "tcp" }; end end diff --git a/net/xmppcomponent_listener.lua b/net/xmppcomponent_listener.lua index 6f02b136..a96a1cff 100644 --- a/net/xmppcomponent_listener.lua +++ b/net/xmppcomponent_listener.lua @@ -67,13 +67,13 @@ end function stream_callbacks.streamopened(session, attr) if config.get(attr.to, "core", "component_module") ~= "component" then - -- Trying to act as a component domain which + -- Trying to act as a component domain which -- hasn't been configured session:close{ condition = "host-unknown", text = tostring(attr.to).." does not match any configured external components" }; return; end - -- Note that we don't create the internal component + -- Note that we don't create the internal component -- until after the external component auths successfully session.host = attr.to; -- cgit v1.2.3