Mercurial > prosody-hg
comparison core/stanza_router.lua @ 1412:6cfcab7cd4e7
stanza_router: A little refactoring
| author | Waqas Hussain <waqas20@gmail.com> |
|---|---|
| date | Thu, 25 Jun 2009 08:17:02 +0500 |
| parents | b12096b69f36 |
| children | b7e17efe433e |
comparison
equal
deleted
inserted
replaced
| 1411:b12096b69f36 | 1412:6cfcab7cd4e7 |
|---|---|
| 180 | 180 |
| 181 -- Auto-detect origin if not specified | 181 -- Auto-detect origin if not specified |
| 182 origin = origin or hosts[from_host]; | 182 origin = origin or hosts[from_host]; |
| 183 if not origin then return false; end | 183 if not origin then return false; end |
| 184 | 184 |
| 185 local host_session = hosts[host] | 185 if hosts[host] then |
| 186 if host_session and host_session.type == "local" then | |
| 187 -- old stanza routing code removed | 186 -- old stanza routing code removed |
| 188 core_post_stanza(origin, stanza); | 187 core_post_stanza(origin, stanza); |
| 189 elseif origin.type == "c2s" then | 188 elseif origin.type == "c2s" then |
| 190 -- Remote host | 189 -- Remote host |
| 191 local xmlns = stanza.attr.xmlns; | 190 local xmlns = stanza.attr.xmlns; |
