aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/loggingmanager.lua18
-rw-r--r--core/rostermanager.lua2
-rw-r--r--core/sessionmanager.lua4
3 files changed, 12 insertions, 12 deletions
diff --git a/core/loggingmanager.lua b/core/loggingmanager.lua
index c6361146..f348dbdf 100644
--- a/core/loggingmanager.lua
+++ b/core/loggingmanager.lua
@@ -45,16 +45,16 @@ local logging_levels = { "debug", "info", "warn", "error" }
-- This function is called automatically when a new sink type is added [see apply_sink_rules()]
local function add_rule(sink_config)
local sink_maker = log_sink_types[sink_config.to];
- if sink_maker then
- -- Create sink
- local sink = sink_maker(sink_config);
+ if not sink_maker then
+ return; -- No such sink type
+ end
- -- Set sink for all chosen levels
- for level in pairs(get_levels(sink_config.levels or logging_levels)) do
- logger.add_level_sink(level, sink);
- end
- else
- -- No such sink type
+ -- Create sink
+ local sink = sink_maker(sink_config);
+
+ -- Set sink for all chosen levels
+ for level in pairs(get_levels(sink_config.levels or logging_levels)) do
+ logger.add_level_sink(level, sink);
end
end
diff --git a/core/rostermanager.lua b/core/rostermanager.lua
index 19d07c94..7e165c27 100644
--- a/core/rostermanager.lua
+++ b/core/rostermanager.lua
@@ -227,7 +227,7 @@ function is_contact_pending_in(username, host, jid)
local roster = load_roster(username, host);
return roster[false].pending[jid];
end
-function set_contact_pending_in(username, host, jid, pending)
+function set_contact_pending_in(username, host, jid)
local roster = load_roster(username, host);
local item = roster[jid];
if item and (item.subscription == "from" or item.subscription == "both") then
diff --git a/core/sessionmanager.lua b/core/sessionmanager.lua
index 8767e869..d833dbe5 100644
--- a/core/sessionmanager.lua
+++ b/core/sessionmanager.lua
@@ -193,8 +193,8 @@ function bind_resource(session, resource)
return true;
end
-function send_to_available_resources(user, host, stanza)
- local jid = user.."@"..host;
+function send_to_available_resources(username, host, stanza)
+ local jid = username.."@"..host;
local count = 0;
local user = bare_sessions[jid];
if user then