Mercurial > prosody-modules
comparison mod_bidi/mod_bidi.lua @ 1127:38e56be11584
mod_bidi: Make sessions table weak
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 03 Aug 2013 00:53:09 +0200 |
parents | 6fd328b8e136 |
children | 6b344b7e4781 |
comparison
equal
deleted
inserted
replaced
1126:6fd328b8e136 | 1127:38e56be11584 |
---|---|
11 local traceback = debug.traceback; | 11 local traceback = debug.traceback; |
12 local hosts = hosts; | 12 local hosts = hosts; |
13 local xmlns_bidi_feature = "urn:xmpp:features:bidi" | 13 local xmlns_bidi_feature = "urn:xmpp:features:bidi" |
14 local xmlns_bidi = "urn:xmpp:bidi"; | 14 local xmlns_bidi = "urn:xmpp:bidi"; |
15 local secure_only = module:get_option_boolean("secure_bidi_only", true); | 15 local secure_only = module:get_option_boolean("secure_bidi_only", true); |
16 local bidi_sessions = module:shared"sessions"; | 16 local bidi_sessions = module:shared"sessions-cache"; |
17 | 17 |
18 local function handleerr(err) log("error", "Traceback[s2s]: %s: %s", tostring(err), traceback()); end | 18 local function handleerr(err) log("error", "Traceback[s2s]: %s: %s", tostring(err), traceback()); end |
19 local function handlestanza(session, stanza) | 19 local function handlestanza(session, stanza) |
20 if stanza.attr.xmlns == "jabber:client" then --COMPAT: Prosody pre-0.6.2 may send jabber:client | 20 if stanza.attr.xmlns == "jabber:client" then --COMPAT: Prosody pre-0.6.2 may send jabber:client |
21 stanza.attr.xmlns = nil; | 21 stanza.attr.xmlns = nil; |