aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2023-05-24 15:35:28 +0200
committerKim Alvefur <zash@zash.se>2023-05-24 15:35:28 +0200
commitdd2e84271facb85d6cc079094917cbe0feff7225 (patch)
tree06e894e658676d3c816acbbfa6fdc9c287388b0a
parent3320521129c7c335c44f98eac129c1cf3b3d5210 (diff)
parent20afe7d20dfde84a9deb6ed4f85a6e7a9429f09c (diff)
downloadprosody-dd2e84271facb85d6cc079094917cbe0feff7225.tar.gz
prosody-dd2e84271facb85d6cc079094917cbe0feff7225.zip
Merge 0.12->trunk
-rw-r--r--core/features.lua2
-rw-r--r--plugins/mod_s2s.lua4
2 files changed, 6 insertions, 0 deletions
diff --git a/core/features.lua b/core/features.lua
index 9acc2042..8fbfbe9c 100644
--- a/core/features.lua
+++ b/core/features.lua
@@ -10,5 +10,7 @@ return {
"loader";
-- "keyval+" store
"keyval+";
+
+ "s2sout-pre-connect-event";
};
};
diff --git a/plugins/mod_s2s.lua b/plugins/mod_s2s.lua
index eaa9c35a..819e25d3 100644
--- a/plugins/mod_s2s.lua
+++ b/plugins/mod_s2s.lua
@@ -226,6 +226,10 @@ function route_to_new_session(event)
resolver;
});
end
+
+ local pre_event = { session = host_session; resolver = resolver };
+ module:context(from_host):fire_event("s2sout-pre-connect", pre_event);
+ resolver = pre_event.resolver;
connect(resolver, listener, nil, { session = host_session });
m_initiated_connections:with_labels(from_host):add(1)
return true;