Software /
code /
prosody
Diff
util/rfc3484.lua @ 4830:ea907059a90e
util.rfc3484: Don't pollute the global scope.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 10 May 2012 23:00:45 +0200 |
parent | 4423:ded726418b16 |
line wrap: on
line diff
--- a/util/rfc3484.lua Thu May 10 05:57:24 2012 +0200 +++ b/util/rfc3484.lua Thu May 10 23:00:45 2012 +0200 @@ -19,7 +19,7 @@ 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 @@ return candidates[1]; end -function destination(candidates, sources) +local function destination(candidates, sources) local sourceAddrs = {}; local function comp(ipA, ipB) local ipAsource = sourceAddrs[ipA];