Software / code / prosody
Comparison
plugins/mod_component.lua @ 4993:5243b74a4cbb
Hopefully inert commit to clean up logging across a number of modules, removing all cases of concatenation when building log messages
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Mon, 23 Jul 2012 17:32:33 +0100 |
| parent | 4806:27a99c289b90 |
| child | 5013:ab693eea0869 |
comparison
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"); |