Changeset

4227:6b83ef6ec845

mod_dialback: Use session:close() on dialback failure instead of s2smanager.destroy_session() (thanks Zash)
author Matthew Wild <mwild1@gmail.com>
date Mon, 21 Mar 2011 19:32:51 +0000
parents 4224:8b8d2b8e4d0b
children 4228:1c2daf61c348
files plugins/mod_dialback.lua
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_dialback.lua	Thu Mar 03 18:14:08 2011 +0000
+++ b/plugins/mod_dialback.lua	Mon Mar 21 19:32:51 2011 +0000
@@ -12,7 +12,6 @@
 local s2s_make_authenticated = require "core.s2smanager".make_authenticated;
 local s2s_initiate_dialback = require "core.s2smanager".initiate_dialback;
 local s2s_verify_dialback = require "core.s2smanager".verify_dialback;
-local s2s_destroy_session = require "core.s2smanager".destroy_session;
 
 local log = module._log;
 
@@ -126,7 +125,7 @@
 		if stanza.attr.type == "valid" then
 			s2s_make_authenticated(origin, attr.from);
 		else
-			s2s_destroy_session(origin)
+			origin:close("not-authorized", "dialback authentication failed");
 		end
 		return true;
 	end