plugins/mod_component.lua
changeset 4993 5243b74a4cbb
parent 4806 27a99c289b90
child 5013 ab693eea0869
equal deleted inserted replaced
4992:e79e4d1f75de 4993:5243b74a4cbb
   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");