Software /
code /
prosody
Comparison
core/stanza_router.lua @ 1411:b12096b69f36
stanza_router: Remove unused variables
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Thu, 25 Jun 2009 08:15:42 +0500 |
parent | 1410:b71a9e29adc3 |
child | 1412:6cfcab7cd4e7 |
comparison
equal
deleted
inserted
replaced
1410:b71a9e29adc3 | 1411:b12096b69f36 |
---|---|
173 core_route_stanza(origin, stanza); | 173 core_route_stanza(origin, stanza); |
174 end | 174 end |
175 end | 175 end |
176 | 176 |
177 function core_route_stanza(origin, stanza) | 177 function core_route_stanza(origin, stanza) |
178 local to = stanza.attr.to; | 178 local node, host, resource = jid_split(stanza.attr.to); |
179 local node, host, resource = jid_split(to); | 179 local from_node, from_host, from_resource = jid_split(stanza.attr.from); |
180 local to_bare = node and (node.."@"..host) or host; -- bare JID | |
181 local from = stanza.attr.from; | |
182 local from_node, from_host, from_resource = jid_split(from); | |
183 local from_bare = from_node and (from_node.."@"..from_host) or from_host; -- bare JID | |
184 | 180 |
185 -- Auto-detect origin if not specified | 181 -- Auto-detect origin if not specified |
186 origin = origin or hosts[from_host]; | 182 origin = origin or hosts[from_host]; |
187 if not origin then return false; end | 183 if not origin then return false; end |
188 | 184 |