aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-09-07 17:31:26 +0200
committerKim Alvefur <zash@zash.se>2019-09-07 17:31:26 +0200
commit1cebbe481be0dbce23f8c7288e091cfb557225d2 (patch)
tree1c8f06b4e6581f2b88fa45fb1825350c3a61b276
parentcf236f25f8322327921009ab92e33788e4c48de9 (diff)
downloadprosody-1cebbe481be0dbce23f8c7288e091cfb557225d2.tar.gz
prosody-1cebbe481be0dbce23f8c7288e091cfb557225d2.zip
core.s2smanager: Add [direction] boolean flags to s2s connections
This will allow representing connections that go both directions
-rw-r--r--core/s2smanager.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/s2smanager.lua b/core/s2smanager.lua
index ccdf4932..45993fd2 100644
--- a/core/s2smanager.lua
+++ b/core/s2smanager.lua
@@ -31,6 +31,7 @@ local function new_incoming(conn)
sessionlib.set_logger(host_session);
sessionlib.set_conn(host_session, conn);
host_session.direction = "incoming";
+ host_session.incoming = true;
host_session.hosts = {};
incoming_s2s[host_session] = true;
return host_session;
@@ -45,6 +46,7 @@ local function new_outgoing(from_host, to_host)
host_session.host = from_host;
host_session.notopen = true;
host_session.direction = "outgoing";
+ host_session.outgoing = true;
hosts[from_host].s2sout[to_host] = host_session;
return host_session;
end