Software /
code /
prosody
Changeset
1407:85ec12aec35f
stanza_router: Removed unused function: select_best_resources
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Thu, 25 Jun 2009 07:59:04 +0500 |
parents | 1406:83c6fb3d9e73 |
children | 1408:9b745496b953 |
files | core/stanza_router.lua |
diffstat | 1 files changed, 0 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/core/stanza_router.lua Thu Jun 25 07:57:57 2009 +0500 +++ b/core/stanza_router.lua Thu Jun 25 07:59:04 2009 +0500 @@ -31,8 +31,6 @@ local jid_prepped_split = require "util.jid".prepped_split; local fire_event = prosody.events.fire_event; -local select_best_resources; - function core_process_stanza(origin, stanza) (origin.log or log)("debug", "Received[%s]: %s", origin.type, stanza:top_tag()) @@ -231,20 +229,3 @@ end stanza.attr.to = to; -- reset end - -function select_best_resources(user) - local priority = 0; - local recipients = {}; - for _, session in pairs(user.sessions) do -- find resource with greatest priority - if session.presence then - local p = session.priority; - if p > priority then - priority = p; - recipients = {session}; - elseif p == priority then - t_insert(recipients, session); - end - end - end - return recipients; -end