aboutsummaryrefslogtreecommitdiffstats
path: root/core/stanza_router.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-03-06 01:14:32 +0100
committerKim Alvefur <zash@zash.se>2017-03-06 01:14:32 +0100
commitca65f0d2d3718301b880c0260c991cd8ee7977ae (patch)
treee58db2bf464bf09301a9c02c27330c2dba6b926d /core/stanza_router.lua
parentb133b78d47ff180110b0b29612d3cd257a9972c1 (diff)
parente45c5961ac42007aa6c9282afddff91cd1e27124 (diff)
downloadprosody-ca65f0d2d3718301b880c0260c991cd8ee7977ae.tar.gz
prosody-ca65f0d2d3718301b880c0260c991cd8ee7977ae.zip
Merge 0.10->trunk
Diffstat (limited to 'core/stanza_router.lua')
-rw-r--r--core/stanza_router.lua12
1 files changed, 8 insertions, 4 deletions
diff --git a/core/stanza_router.lua b/core/stanza_router.lua
index 228fed80..2312614c 100644
--- a/core/stanza_router.lua
+++ b/core/stanza_router.lua
@@ -38,7 +38,8 @@ local function handle_unhandled_stanza(host, origin, stanza) --luacheck: ignore
if st_type == "error" or (name == "iq" and st_type == "result") then
if st_type == "error" then
local err_type, err_condition, err_message = stanza:get_error();
- log("debug", "Discarding unhandled error %s (%s, %s) from %s: %s", name, err_type, err_condition or "unknown condition", origin_type, stanza:top_tag());
+ log("debug", "Discarding unhandled error %s (%s, %s) from %s: %s",
+ name, err_type, err_condition or "unknown condition", origin_type, stanza:top_tag());
else
log("debug", "Discarding %s from %s of type: %s", name, origin_type, st_type or '<nil>');
end
@@ -52,7 +53,8 @@ local function handle_unhandled_stanza(host, origin, stanza) --luacheck: ignore
origin.send(st.error_reply(stanza, "cancel", "service-unavailable"));
end
else
- log("warn", "Unhandled %s stream element or stanza: %s; xmlns=%s: %s", origin_type, name, xmlns, tostring(stanza)); -- we didn't handle it
+ log("warn", "Unhandled %s stream element or stanza: %s; xmlns=%s: %s",
+ origin_type, name, xmlns, tostring(stanza)); -- we didn't handle it
origin:close("unsupported-stanza-type");
end
end
@@ -211,12 +213,14 @@ function core_route_stanza(origin, stanza)
else
local xmlns = stanza.attr.xmlns;
stanza.attr.xmlns = nil;
- local routed = host_session.events.fire_event("route/remote", { origin = origin, stanza = stanza, from_host = from_host, to_host = host });
+ local routed = host_session.events.fire_event("route/remote", {
+ origin = origin, stanza = stanza, from_host = from_host, to_host = host });
stanza.attr.xmlns = xmlns; -- reset
if not routed then
log("debug", "... no, just kidding.");
if stanza.attr.type == "error" or (stanza.name == "iq" and stanza.attr.type == "result") then return; end
- core_route_stanza(host_session, st.error_reply(stanza, "cancel", "not-allowed", "Communication with remote domains is not enabled"));
+ core_route_stanza(host_session, st.error_reply(stanza, "cancel", "not-allowed",
+ "Communication with remote domains is not enabled"));
end
end
end