aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2010-10-16 23:00:42 +0500
committerWaqas Hussain <waqas20@gmail.com>2010-10-16 23:00:42 +0500
commitb7e51a203d3d95961294c711ae0d9c449ddb040d (patch)
tree376af083a7225da43a8659f6d0d6184966d10baa /net
parent85b44a1dfd59fee9a26527cc759ef72780a1668c (diff)
downloadprosody-b7e51a203d3d95961294c711ae0d9c449ddb040d.tar.gz
prosody-b7e51a203d3d95961294c711ae0d9c449ddb040d.zip
Monster whitespace commit (beware the whitespace monster).
Diffstat (limited to 'net')
-rw-r--r--net/connlisteners.lua4
-rw-r--r--net/dns.lua18
-rw-r--r--net/http.lua10
-rw-r--r--net/httpserver.lua6
-rw-r--r--net/xmppcomponent_listener.lua4
5 files changed, 21 insertions, 21 deletions
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;