aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2009-06-25 07:59:04 +0500
committerWaqas Hussain <waqas20@gmail.com>2009-06-25 07:59:04 +0500
commitbd3915d382d6e98379df05f65246b69a04ca6140 (patch)
treeca59c8842f6afe20107c8ed2c7fd9604a1278618 /core
parent67560bdcc6c100eee31b2c2e6d04c7acfff20ce4 (diff)
downloadprosody-bd3915d382d6e98379df05f65246b69a04ca6140.tar.gz
prosody-bd3915d382d6e98379df05f65246b69a04ca6140.zip
stanza_router: Removed unused function: select_best_resources
Diffstat (limited to 'core')
-rw-r--r--core/stanza_router.lua19
1 files changed, 0 insertions, 19 deletions
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