aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2008-11-14 02:33:20 +0000
committerMatthew Wild <mwild1@gmail.com>2008-11-14 02:33:20 +0000
commitc374478423b1fa6df31f2e133db77f89ceb91fac (patch)
tree9efcf32f15f6568df6fd4e8291532bbee3472be2 /core
parentf980ba5734e2a81348f14905147519b26ef8d794 (diff)
downloadprosody-c374478423b1fa6df31f2e133db77f89ceb91fac.tar.gz
prosody-c374478423b1fa6df31f2e133db77f89ceb91fac.zip
I knew it ;) Fix sending error replies over s2s (though we shouldn't be error'ing on stream:features anyway)
Diffstat (limited to 'core')
-rw-r--r--core/s2smanager.lua2
-rw-r--r--core/stanza_router.lua3
2 files changed, 3 insertions, 2 deletions
diff --git a/core/s2smanager.lua b/core/s2smanager.lua
index 530e3087..8b421f13 100644
--- a/core/s2smanager.lua
+++ b/core/s2smanager.lua
@@ -48,7 +48,7 @@ function send_to_host(from_host, to_host, data)
elseif host.type == "local" or host.type == "component" then
log("error", "Trying to send a stanza to ourselves??")
log("error", "Traceback: %s", get_traceback());
- log("error", "Stanza: %s", stanza);
+ log("error", "Stanza: %s", data);
else
(host.log or log)("debug", "going to send stanza to "..to_host.." from "..from_host);
-- FIXME
diff --git a/core/stanza_router.lua b/core/stanza_router.lua
index 1793f547..6c117c25 100644
--- a/core/stanza_router.lua
+++ b/core/stanza_router.lua
@@ -182,7 +182,8 @@ function core_handle_stanza(origin, stanza)
end -- TODO handle other stanzas
else
log("warn", "Unhandled origin: %s", origin.type);
- origin.send(st.error_reply(stanza, "cancel", "service-unavailable")); -- FIXME correct error?
+ -- s2s stanzas can get here
+ (origin.sends2s or origin.send)(st.error_reply(stanza, "cancel", "service-unavailable")); -- FIXME correct error?
end
end