Software /
code /
prosody
Comparison
core/stanza_router.lua @ 726:68a776711ba9
stanza_router: That'll teach me to not commit at this time of night. Or not.
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 16 Jan 2009 04:57:23 +0000 |
parent | 725:96110075288b |
child | 758:b1885732e979 |
comparison
equal
deleted
inserted
replaced
725:96110075288b | 726:68a776711ba9 |
---|---|
54 origin.send(st.error_reply(stanza, "cancel", "service-unavailable")); -- FIXME correct error? | 54 origin.send(st.error_reply(stanza, "cancel", "service-unavailable")); -- FIXME correct error? |
55 end | 55 end |
56 end | 56 end |
57 | 57 |
58 function core_process_stanza(origin, stanza) | 58 function core_process_stanza(origin, stanza) |
59 (origin.log or log)("debug", "Received[%s]: %s", origin.type, top_tag()) | 59 (origin.log or log)("debug", "Received[%s]: %s", origin.type, stanza:top_tag()) |
60 | 60 |
61 if not stanza.attr.xmlns then stanza.attr.xmlns = "jabber:client"; end -- FIXME Hack. This should be removed when we fix namespace handling. | 61 if not stanza.attr.xmlns then stanza.attr.xmlns = "jabber:client"; end -- FIXME Hack. This should be removed when we fix namespace handling. |
62 -- TODO verify validity of stanza (as well as JID validity) | 62 -- TODO verify validity of stanza (as well as JID validity) |
63 if stanza.name == "iq" and not(#stanza.tags == 1 and stanza.tags[1].attr.xmlns) then | 63 if stanza.name == "iq" and not(#stanza.tags == 1 and stanza.tags[1].attr.xmlns) then |
64 if stanza.attr.type == "set" or stanza.attr.type == "get" then | 64 if stanza.attr.type == "set" or stanza.attr.type == "get" then |