Diff

plugins/mod_dialback.lua @ 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
parent 3534:c68590b13a6d
child 4238:05f991b4a90e
child 4314:1e1110840965
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