diff options
author | Kim Alvefur <zash@zash.se> | 2017-09-14 02:48:34 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2017-09-14 02:48:34 +0200 |
commit | 2547ccfe3d26fbf57e0ecddf5cfd5d21377c3633 (patch) | |
tree | ae64d69a765500ad798ce354363683ab22571fa3 /plugins/mod_s2s/mod_s2s.lua | |
parent | 8483401b3203a6745fafea2303727732c8f08ec7 (diff) | |
parent | 3937703c4d9a2ea3200d93d7e3a1eecea3f1e1cb (diff) | |
download | prosody-2547ccfe3d26fbf57e0ecddf5cfd5d21377c3633.tar.gz prosody-2547ccfe3d26fbf57e0ecddf5cfd5d21377c3633.zip |
Merge 0.10->trunk
Diffstat (limited to 'plugins/mod_s2s/mod_s2s.lua')
-rw-r--r-- | plugins/mod_s2s/mod_s2s.lua | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/plugins/mod_s2s/mod_s2s.lua b/plugins/mod_s2s/mod_s2s.lua index c2dd9900..b46b7e2a 100644 --- a/plugins/mod_s2s/mod_s2s.lua +++ b/plugins/mod_s2s/mod_s2s.lua @@ -438,16 +438,14 @@ function stream_callbacks.error(session, error, data) session:close("not-well-formed"); elseif error == "stream-error" then local condition, text = "undefined-condition"; - for child in data:children() do - if child.attr.xmlns == xmlns_xmpp_streams then - if child.name ~= "text" then - condition = child.name; - else - text = child:get_text(); - end - if condition ~= "undefined-condition" and text then - break; - end + for child in data:childtags(nil, xmlns_xmpp_streams) do + if child.name ~= "text" then + condition = child.name; + else + text = child:get_text(); + end + if condition ~= "undefined-condition" and text then + break; end end text = condition .. (text and (" ("..text..")") or ""); |