Software /
code /
prosody
Comparison
core/stanza_router.lua @ 1369:633e032a3b4b
stanza_router: Skip prepping 'from' on c2s origins - #optimization
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Sat, 20 Jun 2009 18:08:57 +0500 |
parent | 1368:0cb70958b8fb |
child | 1370:3a467e6885f0 |
comparison
equal
deleted
inserted
replaced
1368:0cb70958b8fb | 1369:633e032a3b4b |
---|---|
76 end | 76 end |
77 to_bare = node and (node.."@"..host) or host; -- bare JID | 77 to_bare = node and (node.."@"..host) or host; -- bare JID |
78 if resource then to = to_bare.."/"..resource; else to = to_bare; end | 78 if resource then to = to_bare.."/"..resource; else to = to_bare; end |
79 stanza.attr.to = to; | 79 stanza.attr.to = to; |
80 end | 80 end |
81 if from then | 81 if from and not origin.full_jid then |
82 -- We only stamp the 'from' on c2s stanzas, so we still need to check validity | 82 -- We only stamp the 'from' on c2s stanzas, so we still need to check validity |
83 from_node, from_host, from_resource = jid_prepped_split(from); | 83 from_node, from_host, from_resource = jid_prepped_split(from); |
84 if not from_host then | 84 if not from_host then |
85 log("warn", "Received stanza with invalid source JID: %s", from); | 85 log("warn", "Received stanza with invalid source JID: %s", from); |
86 if stanza.attr.type ~= "error" and stanza.attr.type ~= "result" then | 86 if stanza.attr.type ~= "error" and stanza.attr.type ~= "result" then |