s2smanager, mod_compression, mod_tls: Changed event.session to event.origin for s2s-stream-features event for consistency.

Fri, 12 Feb 2010 04:30:17 +0500

author
Waqas Hussain <waqas20@gmail.com>
date
Fri, 12 Feb 2010 04:30:17 +0500
changeset 2613
afa20941e098
parent 2612
475552b04151
child 2614
7a589e9e2372

s2smanager, mod_compression, mod_tls: Changed event.session to event.origin for s2s-stream-features event for consistency.

core/s2smanager.lua file | annotate | diff | comparison | revisions
plugins/mod_compression.lua file | annotate | diff | comparison | revisions
plugins/mod_tls.lua file | annotate | diff | comparison | revisions
--- a/core/s2smanager.lua	Fri Feb 12 04:25:37 2010 +0500
+++ b/core/s2smanager.lua	Fri Feb 12 04:30:17 2010 +0500
@@ -389,7 +389,7 @@
 			local features = st.stanza("stream:features");
 			
 			if session.to_host then
-				hosts[session.to_host].events.fire_event("s2s-stream-features", { session = session, features = features });
+				hosts[session.to_host].events.fire_event("s2s-stream-features", { origin = session, features = features });
 			else
 				(session.log or log)("warn", "No 'to' on stream header from %s means we can't offer any features", session.from_host or "unknown host");
 			end
--- a/plugins/mod_compression.lua	Fri Feb 12 04:25:37 2010 +0500
+++ b/plugins/mod_compression.lua	Fri Feb 12 04:30:17 2010 +0500
@@ -34,9 +34,9 @@
 end);
 
 module:hook("s2s-stream-features", function(event)
-	local session, features = event.session, event.features;
+	local origin, features = event.origin, event.features;
 	-- FIXME only advertise compression support when TLS layer has no compression enabled
-	if not session.compressed then 
+	if not origin.compressed then 
 		features:add_child(compression_stream_feature);
 	end
 end);
--- a/plugins/mod_tls.lua	Fri Feb 12 04:25:37 2010 +0500
+++ b/plugins/mod_tls.lua	Fri Feb 12 04:30:17 2010 +0500
@@ -49,8 +49,8 @@
 	end
 end);
 module:hook("s2s-stream-features", function(event)
-	local session, features = event.session, event.features;
-	if session.to_host and session.type ~= "s2sin" and session.conn.starttls then
+	local origin, features = event.origin, event.features;
+	if origin.to_host and origin.type ~= "s2sin" and origin.conn.starttls then
 		features:add_child(s2s_feature);
 	end
 end);

mercurial