Software /
code /
prosody
Comparison
plugins/mod_s2s/mod_s2s.lua @ 8235:7d9a2c200736
Merge 0.10->trunk
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 14 Sep 2017 02:48:34 +0200 |
parent | 7868:11fcdef5022f |
parent | 8234:97b3ca502547 |
child | 8268:e21d82551e05 |
comparison
equal
deleted
inserted
replaced
8221:4989a625419a | 8235:7d9a2c200736 |
---|---|
436 elseif error == "parse-error" then | 436 elseif error == "parse-error" then |
437 session.log("debug", "Server-to-server XML parse error: %s", tostring(error)); | 437 session.log("debug", "Server-to-server XML parse error: %s", tostring(error)); |
438 session:close("not-well-formed"); | 438 session:close("not-well-formed"); |
439 elseif error == "stream-error" then | 439 elseif error == "stream-error" then |
440 local condition, text = "undefined-condition"; | 440 local condition, text = "undefined-condition"; |
441 for child in data:children() do | 441 for child in data:childtags(nil, xmlns_xmpp_streams) do |
442 if child.attr.xmlns == xmlns_xmpp_streams then | 442 if child.name ~= "text" then |
443 if child.name ~= "text" then | 443 condition = child.name; |
444 condition = child.name; | 444 else |
445 else | 445 text = child:get_text(); |
446 text = child:get_text(); | 446 end |
447 end | 447 if condition ~= "undefined-condition" and text then |
448 if condition ~= "undefined-condition" and text then | 448 break; |
449 break; | |
450 end | |
451 end | 449 end |
452 end | 450 end |
453 text = condition .. (text and (" ("..text..")") or ""); | 451 text = condition .. (text and (" ("..text..")") or ""); |
454 session.log("info", "Session closed by remote with error: %s", text); | 452 session.log("info", "Session closed by remote with error: %s", text); |
455 session:close(nil, text); | 453 session:close(nil, text); |