Software /
code /
prosody
Comparison
plugins/mod_s2s/mod_s2s.lua @ 10248:d7cadd118053
mod_s2s: Insert s2sin into outgoing routing table when bidirectional
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 07 Sep 2019 18:33:16 +0200 |
parent | 10247:5de65f30fe5e |
child | 10249:790c6ae54dd6 |
comparison
equal
deleted
inserted
replaced
10247:5de65f30fe5e | 10248:d7cadd118053 |
---|---|
214 return hosts[from].events.fire_event("route/remote", { from_host = from, to_host = to, stanza = stanza }); | 214 return hosts[from].events.fire_event("route/remote", { from_host = from, to_host = to, stanza = stanza }); |
215 end; | 215 end; |
216 end | 216 end |
217 | 217 |
218 else | 218 else |
219 if session.outgoing and not hosts[to].s2sout[from] then | |
220 session.log("debug", "Setting up to handle route from %s to %s", to, from); | |
221 hosts[to].s2sout[from] = session; -- luacheck: ignore 122 | |
222 end | |
219 local host_session = hosts[to]; | 223 local host_session = hosts[to]; |
220 session.send = function(stanza) | 224 session.send = function(stanza) |
221 return host_session.events.fire_event("route/remote", { from_host = to, to_host = from, stanza = stanza }); | 225 return host_session.events.fire_event("route/remote", { from_host = to, to_host = from, stanza = stanza }); |
222 end; | 226 end; |
223 | 227 |