Mercurial > prosody-modules
comparison mod_bidi/mod_bidi.lua @ 1124:689e69df1cc4
mod_bidi: Make sure context for stanzas coming from bidi-enabled s2sout connections have the correct direction attribute
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Sat, 03 Aug 2013 00:24:12 +0200 |
| parents | 0e16e5e2f410 |
| children | 901e361af918 |
comparison
equal
deleted
inserted
replaced
| 1123:0e16e5e2f410 | 1124:689e69df1cc4 |
|---|---|
| 34 conflicting_session:close{ condition = "conflict", text = "Replaced by bidirectional stream" } | 34 conflicting_session:close{ condition = "conflict", text = "Replaced by bidirectional stream" } |
| 35 end | 35 end |
| 36 bidi_sessions[origin.from_host] = origin; | 36 bidi_sessions[origin.from_host] = origin; |
| 37 elseif origin.type == "s2sout" then -- handle incoming stanzas correctly | 37 elseif origin.type == "s2sout" then -- handle incoming stanzas correctly |
| 38 local bidi_session = { | 38 local bidi_session = { |
| 39 type = "s2sin"; | 39 type = "s2sin"; direction = "incoming"; |
| 40 is_bidi = true; orig_session = origin; | 40 is_bidi = true; orig_session = origin; |
| 41 to_host = origin.from_host; | 41 to_host = origin.from_host; |
| 42 from_host = origin.to_host; | 42 from_host = origin.to_host; |
| 43 hosts = {}; | 43 hosts = {}; |
| 44 } | 44 } |
