aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2008-11-13 19:14:31 +0500
committerWaqas Hussain <waqas20@gmail.com>2008-11-13 19:14:31 +0500
commita1740642f2a9af6bf42747fe0b4bf2148fc38449 (patch)
treee147fa191642947023af4cc2ac88de4aa0a13df1 /core
parent093cf3e0172ee565202910a324261883d6ff5a5a (diff)
downloadprosody-a1740642f2a9af6bf42747fe0b4bf2148fc38449.tar.gz
prosody-a1740642f2a9af6bf42747fe0b4bf2148fc38449.zip
Added error replies for unhandled stanzas
Diffstat (limited to 'core')
-rw-r--r--core/stanza_router.lua9
1 files changed, 7 insertions, 2 deletions
diff --git a/core/stanza_router.lua b/core/stanza_router.lua
index 5d6358ec..1793f547 100644
--- a/core/stanza_router.lua
+++ b/core/stanza_router.lua
@@ -173,11 +173,16 @@ function core_handle_stanza(origin, stanza)
end
stanza.attr.to = nil; -- reset it
else
- -- TODO error, bad type
+ log("warn", "Unhandled c2s presence: %s", tostring(stanza));
+ origin.send(st.error_reply(stanza, "cancel", "service-unavailable")); -- FIXME correct error?
end
+ else
+ log("warn", "Unhandled c2s stanza: %s", tostring(stanza));
+ origin.send(st.error_reply(stanza, "cancel", "service-unavailable")); -- FIXME correct error?
end -- TODO handle other stanzas
else
- log("warn", "Unhandled origin: %s", origin.type); -- FIXME reply with error
+ log("warn", "Unhandled origin: %s", origin.type);
+ origin.send(st.error_reply(stanza, "cancel", "service-unavailable")); -- FIXME correct error?
end
end