mirror of
https://github.com/bjc/prosody.git
synced 2025-04-05 22:27:38 +03:00
Merge with 0.6
This commit is contained in:
commit
52d66e5267
2 changed files with 7 additions and 5 deletions
|
@ -48,7 +48,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, reason)
|
||||
local sendq = session.sendq;
|
||||
|
|
|
@ -30,18 +30,18 @@ function compare_srv_priorities(csp)
|
|||
assert_equal(csp(r3, r2), false);
|
||||
assert_equal(csp(r3, r3), false);
|
||||
assert_equal(csp(r3, r4), false);
|
||||
assert_equal(csp(r3, r5), true);
|
||||
assert_equal(csp(r3, r5), false);
|
||||
|
||||
assert_equal(csp(r4, r1), false);
|
||||
assert_equal(csp(r4, r2), false);
|
||||
assert_equal(csp(r4, r3), false);
|
||||
assert_equal(csp(r4, r4), false);
|
||||
assert_equal(csp(r4, r5), true);
|
||||
assert_equal(csp(r4, r5), false);
|
||||
|
||||
assert_equal(csp(r5, r1), false);
|
||||
assert_equal(csp(r5, r2), false);
|
||||
assert_equal(csp(r5, r3), false);
|
||||
assert_equal(csp(r5, r4), false);
|
||||
assert_equal(csp(r5, r3), true);
|
||||
assert_equal(csp(r5, r4), true);
|
||||
assert_equal(csp(r5, r5), false);
|
||||
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue