diff options
author | Matthew Wild <mwild1@gmail.com> | 2010-02-25 17:52:33 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2010-02-25 17:52:33 +0000 |
commit | 1ac7b7a3b7659d52221e382e32b5eec18722e27a (patch) | |
tree | 4694593f29d4d4ecad2ecda03be54e7a76813706 | |
parent | 73f760c8965fe46d90c9376bbb2e682c3873dc79 (diff) | |
download | prosody-1ac7b7a3b7659d52221e382e32b5eec18722e27a.tar.gz prosody-1ac7b7a3b7659d52221e382e32b5eec18722e27a.zip |
s2smanager: Fix for the logic SRV record priority comparison (thanks darkrain)
-rw-r--r-- | core/s2smanager.lua | 4 |
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; |