equal
deleted
inserted
replaced
35 local stream_callbacks = { default_ns = xmlns_component }; |
35 local stream_callbacks = { default_ns = xmlns_component }; |
36 |
36 |
37 local xmlns_xmpp_streams = "urn:ietf:params:xml:ns:xmpp-streams"; |
37 local xmlns_xmpp_streams = "urn:ietf:params:xml:ns:xmpp-streams"; |
38 |
38 |
39 function stream_callbacks.error(session, error, data, data2) |
39 function stream_callbacks.error(session, error, data, data2) |
|
40 if session.destroyed then return; end |
40 log("warn", "Error processing component stream: "..tostring(error)); |
41 log("warn", "Error processing component stream: "..tostring(error)); |
41 if error == "no-stream" then |
42 if error == "no-stream" then |
42 session:close("invalid-namespace"); |
43 session:close("invalid-namespace"); |
43 elseif error == "parse-error" then |
44 elseif error == "parse-error" then |
44 session.log("warn", "External component %s XML parse error: %s", tostring(session.host), tostring(data)); |
45 session.log("warn", "External component %s XML parse error: %s", tostring(session.host), tostring(data)); |