s2smanager, mod_compression, mod_tls: Changed event.session to event.origin for s2s...
authorWaqas Hussain <waqas20@gmail.com>
Thu, 11 Feb 2010 23:30:17 +0000 (04:30 +0500)
committerWaqas Hussain <waqas20@gmail.com>
Thu, 11 Feb 2010 23:30:17 +0000 (04:30 +0500)
core/s2smanager.lua
plugins/mod_compression.lua
plugins/mod_tls.lua

index d8ceb4efeb17ca58694a4d0a611cf6f39bd693ca..aba99ee07482c1ab4fda9f3ec16bb6179147e139 100644 (file)
@@ -389,7 +389,7 @@ function streamopened(session, attr)
                        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
index 725c0b633e4b5a85e98963fc66535f955974684f..4b1fa79f12f24b9b1aa347912473bc190dac4149 100644 (file)
@@ -34,9 +34,9 @@ module:hook("stream-features", function(event)
 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);
index dfc1e338c38269ec3f0ddb86850959e3b3302bb0..47b92d7377dab4a54e21a65d011402115c55465e 100644 (file)
@@ -49,8 +49,8 @@ module:hook("stream-features", function(event)
        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);