aboutsummaryrefslogtreecommitdiffstats
path: root/util/rfc3484.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2012-05-10 23:00:45 +0200
committerKim Alvefur <zash@zash.se>2012-05-10 23:00:45 +0200
commit04026ef4c71b3372b7cf24eb1e9dfad64673e222 (patch)
treed14492b19c8f1d65eb4c0dd56acb1ea71d81d667 /util/rfc3484.lua
parent0b7dc871a3f7e6ef5f9193c262fc76e393c75c01 (diff)
downloadprosody-04026ef4c71b3372b7cf24eb1e9dfad64673e222.tar.gz
prosody-04026ef4c71b3372b7cf24eb1e9dfad64673e222.zip
util.rfc3484: Don't pollute the global scope.
Diffstat (limited to 'util/rfc3484.lua')
-rw-r--r--util/rfc3484.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/rfc3484.lua b/util/rfc3484.lua
index dd855a84..5ee572a0 100644
--- a/util/rfc3484.lua
+++ b/util/rfc3484.lua
@@ -19,7 +19,7 @@ local function t_sort(t, comp)
end
end
-function source(dest, candidates)
+local function source(dest, candidates)
local function comp(ipA, ipB)
-- Rule 1: Prefer same address
if dest == ipA then
@@ -70,7 +70,7 @@ function source(dest, candidates)
return candidates[1];
end
-function destination(candidates, sources)
+local function destination(candidates, sources)
local sourceAddrs = {};
local function comp(ipA, ipB)
local ipAsource = sourceAddrs[ipA];