aboutsummaryrefslogtreecommitdiffstats
path: root/core/s2smanager.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2010-01-04 17:32:26 +0000
committerMatthew Wild <mwild1@gmail.com>2010-01-04 17:32:26 +0000
commit801cc75c5786d3e47f8a30adec7475067804fff5 (patch)
treefc1d09f387ea36364c40ad937ab5b4ceb2cc3b45 /core/s2smanager.lua
parentb67695c401e87869c9e57e90759430497f8a1abc (diff)
downloadprosody-801cc75c5786d3e47f8a30adec7475067804fff5.tar.gz
prosody-801cc75c5786d3e47f8a30adec7475067804fff5.zip
s2smanager: Allow new_outgoing() to create sessions without automatically connecting them (set 3rd parameters to false)
Diffstat (limited to 'core/s2smanager.lua')
-rw-r--r--core/s2smanager.lua8
1 files changed, 5 insertions, 3 deletions
diff --git a/core/s2smanager.lua b/core/s2smanager.lua
index 30ac736b..42aa1016 100644
--- a/core/s2smanager.lua
+++ b/core/s2smanager.lua
@@ -148,7 +148,7 @@ function new_incoming(conn)
return session;
end
-function new_outgoing(from_host, to_host)
+function new_outgoing(from_host, to_host, connect)
local host_session = { to_host = to_host, from_host = from_host, host = from_host,
notopen = true, type = "s2sout_unauthed", direction = "outgoing" };
@@ -161,8 +161,10 @@ function new_outgoing(from_host, to_host)
host_session.log = log;
end
- -- Kick the connection attempting machine
- attempt_connection(host_session);
+ if connect ~= false then
+ -- Kick the connection attempting machine into life
+ attempt_connection(host_session);
+ end
if not host_session.sends2s then
-- A sends2s which buffers data (until the stream is opened)