diff options
author | Waqas Hussain <waqas20@gmail.com> | 2008-11-07 02:38:44 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2008-11-07 02:38:44 +0500 |
commit | b5ae4957d4a82c3277de6af1684a60931e5443df (patch) | |
tree | 88c4d80ce9002f436bf4d1dd07a5295218cd2d0e /core/stanza_router.lua | |
parent | a88ddeb67d6d8a31da4ac79d1c2d1a1d776c2c7c (diff) | |
download | prosody-b5ae4957d4a82c3277de6af1684a60931e5443df.tar.gz prosody-b5ae4957d4a82c3277de6af1684a60931e5443df.zip |
Shortened log output for incoming stanzas and an added check.
Diffstat (limited to 'core/stanza_router.lua')
-rw-r--r-- | core/stanza_router.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/stanza_router.lua b/core/stanza_router.lua index 68a71d3b..83470975 100644 --- a/core/stanza_router.lua +++ b/core/stanza_router.lua @@ -31,7 +31,7 @@ local jid_split = require "util.jid".split; local print = print; function core_process_stanza(origin, stanza) - log("debug", "Received["..origin.type.."]: "..tostring(stanza)) + log("debug", "Received["..origin.type.."]: "..tostring(st.reply(st.reply(stanza)))) -- TODO verify validity of stanza (as well as JID validity) if stanza.name == "iq" and not(#stanza.tags == 1 and stanza.tags[1].attr.xmlns) then @@ -81,7 +81,7 @@ function core_process_stanza(origin, stanza) component_handle_stanza(origin, stanza); elseif hosts[to] and hosts[to].type == "component" then -- hack to allow components to handle node@server/resource and server/resource component_handle_stanza(origin, stanza); - elseif hosts[host].type == "component" then -- directed at a component + elseif hosts[host] and hosts[host].type == "component" then -- directed at a component component_handle_stanza(origin, stanza); elseif origin.type == "c2s" and stanza.name == "presence" and stanza.attr.type ~= nil and stanza.attr.type ~= "unavailable" then handle_outbound_presence_subscriptions_and_probes(origin, stanza, from_bare, to_bare); |