mod_tls: Remove origin type check when TLS is requested (thanks MattJ).

Fri, 12 Feb 2010 02:43:02 +0500

author
Waqas Hussain <waqas20@gmail.com>
date
Fri, 12 Feb 2010 02:43:02 +0500
changeset 2602
dff84fdebac0
parent 2601
e64c6a4aa50b
child 2603
3a77cc94b85c

mod_tls: Remove origin type check when TLS is requested (thanks MattJ).

plugins/mod_tls.lua file | annotate | diff | comparison | revisions
--- a/plugins/mod_tls.lua	Fri Feb 12 02:39:50 2010 +0500
+++ b/plugins/mod_tls.lua	Fri Feb 12 02:43:02 2010 +0500
@@ -18,7 +18,7 @@
 
 module:hook("stanza/urn:ietf:params:xml:ns:xmpp-tls:starttls", function(event)
 	local origin = event.origin;
-	if origin.conn.starttls and origin.type == "c2s_unauthed" or origin.type == "s2sin_unauthed" then
+	if origin.conn.starttls then
 		(origin.sends2s or origin.send)(st.stanza("proceed", { xmlns = xmlns_starttls }));
 		origin:reset_stream();
 		local host = origin.to_host or origin.host;

mercurial