Software /
code /
prosody
Comparison
plugins/mod_s2s/mod_s2s.lua @ 8234:97b3ca502547
Merge 0.9->0.10
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 14 Sep 2017 02:47:40 +0200 |
parent | 7866:b6d99132d7dc |
parent | 8233:4e7269c53659 |
child | 8235:7d9a2c200736 |
child | 8267:42fad8465537 |
comparison
equal
deleted
inserted
replaced
8231:97a094fdf101 | 8234:97b3ca502547 |
---|---|
420 elseif error == "parse-error" then | 420 elseif error == "parse-error" then |
421 session.log("debug", "Server-to-server XML parse error: %s", tostring(error)); | 421 session.log("debug", "Server-to-server XML parse error: %s", tostring(error)); |
422 session:close("not-well-formed"); | 422 session:close("not-well-formed"); |
423 elseif error == "stream-error" then | 423 elseif error == "stream-error" then |
424 local condition, text = "undefined-condition"; | 424 local condition, text = "undefined-condition"; |
425 for child in data:children() do | 425 for child in data:childtags(nil, xmlns_xmpp_streams) do |
426 if child.attr.xmlns == xmlns_xmpp_streams then | 426 if child.name ~= "text" then |
427 if child.name ~= "text" then | 427 condition = child.name; |
428 condition = child.name; | 428 else |
429 else | 429 text = child:get_text(); |
430 text = child:get_text(); | 430 end |
431 end | 431 if condition ~= "undefined-condition" and text then |
432 if condition ~= "undefined-condition" and text then | 432 break; |
433 break; | |
434 end | |
435 end | 433 end |
436 end | 434 end |
437 text = condition .. (text and (" ("..text..")") or ""); | 435 text = condition .. (text and (" ("..text..")") or ""); |
438 session.log("info", "Session closed by remote with error: %s", text); | 436 session.log("info", "Session closed by remote with error: %s", text); |
439 session:close(nil, text); | 437 session:close(nil, text); |