mod_saslauth, mod_tls: minor code cleanup

This commit is contained in:
Waqas Hussain 2009-01-13 19:37:12 +05:00
parent c157d04ba3
commit 5e41870700
2 changed files with 18 additions and 25 deletions

View file

@ -21,7 +21,6 @@
local st = require "util.stanza";
local sm_bind_resource = require "core.sessionmanager".bind_resource;
local jid
local base64 = require "util.encodings".base64;
local usermanager_validate_credentials = require "core.usermanager".validate_credentials;
@ -80,7 +79,7 @@ local function password_callback(node, host, mechanism, decoder)
return func, nil;
end
function sasl_handler(session, stanza)
local function sasl_handler(session, stanza)
if stanza.name == "auth" then
-- FIXME ignoring duplicates because ejabberd does
session.sasl_handler = new_sasl(stanza.attr.mechanism, session.host, password_callback);

View file

@ -21,12 +21,6 @@
local st = require "util.stanza";
--local sessions = sessions;
local t_insert = table.insert;
local log = require "util.logger".init("mod_starttls");
local xmlns_starttls ='urn:ietf:params:xml:ns:xmpp-tls';
module:add_handler("c2s_unauthed", "starttls", xmlns_starttls,