equal
deleted
inserted
replaced
122 |
122 |
123 local xmlns_xmpp_streams = "urn:ietf:params:xml:ns:xmpp-streams"; |
123 local xmlns_xmpp_streams = "urn:ietf:params:xml:ns:xmpp-streams"; |
124 |
124 |
125 function stream_callbacks.error(session, error, data, data2) |
125 function stream_callbacks.error(session, error, data, data2) |
126 if session.destroyed then return; end |
126 if session.destroyed then return; end |
127 module:log("warn", "Error processing component stream: "..tostring(error)); |
127 module:log("warn", "Error processing component stream: %s", tostring(error)); |
128 if error == "no-stream" then |
128 if error == "no-stream" then |
129 session:close("invalid-namespace"); |
129 session:close("invalid-namespace"); |
130 elseif error == "parse-error" then |
130 elseif error == "parse-error" then |
131 session.log("warn", "External component %s XML parse error: %s", tostring(session.host), tostring(data)); |
131 session.log("warn", "External component %s XML parse error: %s", tostring(session.host), tostring(data)); |
132 session:close("not-well-formed"); |
132 session:close("not-well-formed"); |