Software /
code /
prosody
Comparison
plugins/s2s/mod_s2s.lua @ 4581:d2eb5962d235
mod_s2s: return true when we sent the stanza, or initiated a new s2sout
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 03 Mar 2012 00:14:48 +0100 |
parent | 4580:351936a8de4a |
child | 4584:9a5de6509aa8 |
comparison
equal
deleted
inserted
replaced
4580:351936a8de4a | 4581:d2eb5962d235 |
---|---|
88 log("error", "WARNING! This might, possibly, be a bug, but it might not..."); | 88 log("error", "WARNING! This might, possibly, be a bug, but it might not..."); |
89 log("error", "We are going to send from %s instead of %s", tostring(host.from_host), tostring(from_host)); | 89 log("error", "We are going to send from %s instead of %s", tostring(host.from_host), tostring(from_host)); |
90 end | 90 end |
91 host.sends2s(stanza); | 91 host.sends2s(stanza); |
92 host.log("debug", "stanza sent over "..host.type); | 92 host.log("debug", "stanza sent over "..host.type); |
93 return true; | |
93 end | 94 end |
94 end | 95 end |
95 end, 200); | 96 end, 200); |
96 | 97 |
97 module:hook("route/remote", function (event) | 98 module:hook("route/remote", function (event) |
110 -- Already destroyed, we need to bounce our stanza | 111 -- Already destroyed, we need to bounce our stanza |
111 host_session:bounce_sendq(host_session.destruction_reason); | 112 host_session:bounce_sendq(host_session.destruction_reason); |
112 end | 113 end |
113 return false; | 114 return false; |
114 end | 115 end |
116 return true; | |
115 end, 100); | 117 end, 100); |
116 | 118 |
117 --- Helper to check that a session peer's certificate is valid | 119 --- Helper to check that a session peer's certificate is valid |
118 local function check_cert_status(session) | 120 local function check_cert_status(session) |
119 local conn = session.conn:socket() | 121 local conn = session.conn:socket() |