Comparison

plugins/mod_legacyauth.lua @ 1832:a805e4fe104a

mod_legacyauth: Undo auth on bind fail. Legacy auth is atomic.
author Waqas Hussain <waqas20@gmail.com>
date Sun, 27 Sep 2009 15:30:01 +0500
parent 1831:ced7a6b8bcd0
child 1833:5408d5100bd0
comparison
equal deleted inserted replaced
1831:ced7a6b8bcd0 1832:a805e4fe104a
58 if success then 58 if success then
59 local err_type, err_msg; 59 local err_type, err_msg;
60 success, err_type, err, err_msg = sessionmanager.bind_resource(session, resource); 60 success, err_type, err, err_msg = sessionmanager.bind_resource(session, resource);
61 if not success then 61 if not success then
62 session.send(st.error_reply(stanza, err_type, err, err_msg)); 62 session.send(st.error_reply(stanza, err_type, err, err_msg));
63 session.username, session.type = nil, "c2s_unauthed"; -- FIXME should this be placed in sessionmanager?
63 return true; 64 return true;
64 end 65 end
65 end 66 end
66 session.send(st.reply(stanza)); 67 session.send(st.reply(stanza));
67 return true; 68 return true;