Software /
code /
prosody
Comparison
core/s2smanager.lua @ 2711:5d97fb043141
s2smanager: Fix for the logic SRV record priority comparison (thanks darkrain)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 25 Feb 2010 17:52:33 +0000 |
parent | 2165:529af807ba1a |
child | 2712:9c579864b20a |
comparison
equal
deleted
inserted
replaced
2710:1600aff0839f | 2711:5d97fb043141 |
---|---|
48 _G.prosody.incoming_s2s = incoming_s2s; | 48 _G.prosody.incoming_s2s = incoming_s2s; |
49 local incoming_s2s = incoming_s2s; | 49 local incoming_s2s = incoming_s2s; |
50 | 50 |
51 module "s2smanager" | 51 module "s2smanager" |
52 | 52 |
53 local function compare_srv_priorities(a,b) return a.priority < b.priority or a.weight < b.weight; end | 53 function compare_srv_priorities(a,b) |
54 return a.priority < b.priority or (a.priority == b.priority and a.weight > b.weight); | |
55 end | |
54 | 56 |
55 local function bounce_sendq(session) | 57 local function bounce_sendq(session) |
56 local sendq = session.sendq; | 58 local sendq = session.sendq; |
57 if sendq then | 59 if sendq then |
58 session.log("info", "sending error replies for "..#sendq.." queued stanzas because of failed outgoing connection to "..tostring(session.to_host)); | 60 session.log("info", "sending error replies for "..#sendq.." queued stanzas because of failed outgoing connection to "..tostring(session.to_host)); |