Mercurial > prosody-hg
comparison core/stanza_router.lua @ 149:40e443eacbbd
Partial s2s commit
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Fri, 24 Oct 2008 07:34:13 +0100 |
| parents | e0f20546cd68 |
| children | d09b8a1ab046 |
comparison
equal
deleted
inserted
replaced
| 143:e0f20546cd68 | 149:40e443eacbbd |
|---|---|
| 19 log("debug", "Received: "..tostring(stanza)) | 19 log("debug", "Received: "..tostring(stanza)) |
| 20 -- TODO verify validity of stanza (as well as JID validity) | 20 -- TODO verify validity of stanza (as well as JID validity) |
| 21 if stanza.name == "iq" and not(#stanza.tags == 1 and stanza.tags[1].attr.xmlns) then | 21 if stanza.name == "iq" and not(#stanza.tags == 1 and stanza.tags[1].attr.xmlns) then |
| 22 if stanza.attr.type == "set" or stanza.attr.type == "get" then | 22 if stanza.attr.type == "set" or stanza.attr.type == "get" then |
| 23 error("Invalid IQ"); | 23 error("Invalid IQ"); |
| 24 elseif #stanza.tags > 1 or not(stanza.attr.type == "error" or stanza.attr.type == "result") then | 24 elseif #stanza.tags > 1 and not(stanza.attr.type == "error" or stanza.attr.type == "result") then |
| 25 error("Invalid IQ"); | 25 error("Invalid IQ"); |
| 26 end | 26 end |
| 27 end | 27 end |
| 28 | 28 |
| 29 if origin.type == "c2s" and not origin.full_jid | 29 if origin.type == "c2s" and not origin.full_jid |
