annotate mod_compat_dialback/mod_compat_dialback.lua @ 4537:53ee391ca689

mod_smacks: Fix traceback due to session being destroyed in send() Sending something can cause the OS to notice that the connection is dead and then the connection can be dead at this point. More likely if opportunistic_writes is enabled.
author Kim Alvefur <zash@zash.se>
date Thu, 01 Apr 2021 11:35:26 +0200
parents 56f6a642fc67
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1900
41ebdb331b94 mod_compat_dialback: Workaround for Dialback with servers that violate RFC 6120 § 4.7.2
Kim Alvefur <zash@zash.se>
parents:
diff changeset
1 -- Prosody IM
41ebdb331b94 mod_compat_dialback: Workaround for Dialback with servers that violate RFC 6120 § 4.7.2
Kim Alvefur <zash@zash.se>
parents:
diff changeset
2 -- Copyright (C) 2008-2010 Matthew Wild
41ebdb331b94 mod_compat_dialback: Workaround for Dialback with servers that violate RFC 6120 § 4.7.2
Kim Alvefur <zash@zash.se>
parents:
diff changeset
3 -- Copyright (C) 2008-2010 Waqas Hussain
41ebdb331b94 mod_compat_dialback: Workaround for Dialback with servers that violate RFC 6120 § 4.7.2
Kim Alvefur <zash@zash.se>
parents:
diff changeset
4 --
41ebdb331b94 mod_compat_dialback: Workaround for Dialback with servers that violate RFC 6120 § 4.7.2
Kim Alvefur <zash@zash.se>
parents:
diff changeset
5 -- This project is MIT/X11 licensed. Please see the
41ebdb331b94 mod_compat_dialback: Workaround for Dialback with servers that violate RFC 6120 § 4.7.2
Kim Alvefur <zash@zash.se>
parents:
diff changeset
6 -- COPYING file in the source package for more information.
41ebdb331b94 mod_compat_dialback: Workaround for Dialback with servers that violate RFC 6120 § 4.7.2
Kim Alvefur <zash@zash.se>
parents:
diff changeset
7 --
41ebdb331b94 mod_compat_dialback: Workaround for Dialback with servers that violate RFC 6120 § 4.7.2
Kim Alvefur <zash@zash.se>
parents:
diff changeset
8
41ebdb331b94 mod_compat_dialback: Workaround for Dialback with servers that violate RFC 6120 § 4.7.2
Kim Alvefur <zash@zash.se>
parents:
diff changeset
9 module:set_global();
41ebdb331b94 mod_compat_dialback: Workaround for Dialback with servers that violate RFC 6120 § 4.7.2
Kim Alvefur <zash@zash.se>
parents:
diff changeset
10
1916
56f6a642fc67 mod_compat_dialback: Use correct API for hooking events (Thanks sol, Lance)
Kim Alvefur <zash@zash.se>
parents: 1900
diff changeset
11 module:hook("s2s-stream-features-legacy", function (data)
1900
41ebdb331b94 mod_compat_dialback: Workaround for Dialback with servers that violate RFC 6120 § 4.7.2
Kim Alvefur <zash@zash.se>
parents:
diff changeset
12 if data.origin.type == "s2sin_unauthed" then
41ebdb331b94 mod_compat_dialback: Workaround for Dialback with servers that violate RFC 6120 § 4.7.2
Kim Alvefur <zash@zash.se>
parents:
diff changeset
13 data.features:tag("dialback", { xmlns='urn:xmpp:features:dialback' }):up();
41ebdb331b94 mod_compat_dialback: Workaround for Dialback with servers that violate RFC 6120 § 4.7.2
Kim Alvefur <zash@zash.se>
parents:
diff changeset
14 end
41ebdb331b94 mod_compat_dialback: Workaround for Dialback with servers that violate RFC 6120 § 4.7.2
Kim Alvefur <zash@zash.se>
parents:
diff changeset
15 end);