From bd3915d382d6e98379df05f65246b69a04ca6140 Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Thu, 25 Jun 2009 07:59:04 +0500 Subject: stanza_router: Removed unused function: select_best_resources --- core/stanza_router.lua | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'core/stanza_router.lua') diff --git a/core/stanza_router.lua b/core/stanza_router.lua index 6dc667fc..eddeb9cd 100644 --- a/core/stanza_router.lua +++ b/core/stanza_router.lua @@ -31,8 +31,6 @@ local jid_split = require "util.jid".split; 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 @@ function core_route_stanza(origin, stanza) 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 -- cgit v1.2.3