Software /
code /
prosody
Comparison
plugins/s2s/mod_s2s.lua @ 4560:edd775310112
mod_s2s: Initiate connections
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 23 Feb 2012 23:03:28 +0100 |
parent | 4559:e2ee6aa50b6c |
child | 4561:429a007f70e8 |
comparison
equal
deleted
inserted
replaced
4559:e2ee6aa50b6c | 4560:edd775310112 |
---|---|
90 host.log("debug", "stanza sent over "..host.type); | 90 host.log("debug", "stanza sent over "..host.type); |
91 end | 91 end |
92 else | 92 else |
93 log("debug", "opening a new outgoing connection for this stanza"); | 93 log("debug", "opening a new outgoing connection for this stanza"); |
94 local host_session = s2s_new_outgoing(from_host, to_host); | 94 local host_session = s2s_new_outgoing(from_host, to_host); |
95 s2sout.initiate_connection(host_session); | |
95 | 96 |
96 -- Store in buffer | 97 -- Store in buffer |
97 host_session.bounce_sendq = bounce_sendq; | 98 host_session.bounce_sendq = bounce_sendq; |
98 host_session.sendq = { {tostring(stanza), stanza.attr.type ~= "error" and stanza.attr.type ~= "result" and st.reply(stanza)} }; | 99 host_session.sendq = { {tostring(stanza), stanza.attr.type ~= "error" and stanza.attr.type ~= "result" and st.reply(stanza)} }; |
99 log("debug", "stanza [%s] queued until connection complete", tostring(stanza.name)); | 100 log("debug", "stanza [%s] queued until connection complete", tostring(stanza.name)); |