aboutsummaryrefslogtreecommitdiffstats
path: root/core/s2smanager.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2010-02-25 17:52:33 +0000
committerMatthew Wild <mwild1@gmail.com>2010-02-25 17:52:33 +0000
commit1ac7b7a3b7659d52221e382e32b5eec18722e27a (patch)
tree4694593f29d4d4ecad2ecda03be54e7a76813706 /core/s2smanager.lua
parent73f760c8965fe46d90c9376bbb2e682c3873dc79 (diff)
downloadprosody-1ac7b7a3b7659d52221e382e32b5eec18722e27a.tar.gz
prosody-1ac7b7a3b7659d52221e382e32b5eec18722e27a.zip
s2smanager: Fix for the logic SRV record priority comparison (thanks darkrain)
Diffstat (limited to 'core/s2smanager.lua')
-rw-r--r--core/s2smanager.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/s2smanager.lua b/core/s2smanager.lua
index 20d932e8..e37cac73 100644
--- a/core/s2smanager.lua
+++ b/core/s2smanager.lua
@@ -50,7 +50,9 @@ local incoming_s2s = incoming_s2s;
module "s2smanager"
-local function compare_srv_priorities(a,b) return a.priority < b.priority or a.weight < b.weight; end
+function compare_srv_priorities(a,b)
+ return a.priority < b.priority or (a.priority == b.priority and a.weight > b.weight);
+end
local function bounce_sendq(session)
local sendq = session.sendq;