Comparison

mod_firewall/test.lib.lua @ 2806:93a4b13ca9f6

mod_firewall/test: Use session passed as argument instead of upvalue
author Kim Alvefur <zash@zash.se>
date Fri, 20 Oct 2017 02:51:38 +0200
parent 2805:2afbb7d47905
child 2807:2c3334131a7d
comparison
equal deleted inserted replaced
2805:2afbb7d47905 2806:93a4b13ca9f6
28 28
29 load_unload_scripts(set.new(arg)); 29 load_unload_scripts(set.new(arg));
30 local session = { notopen = true }; 30 local session = { notopen = true };
31 local stream_callbacks = { default_ns = "jabber:client" }; 31 local stream_callbacks = { default_ns = "jabber:client" };
32 32
33 function stream_callbacks.streamopened() 33 function stream_callbacks.streamopened(session)
34 session.notopen = nil; 34 session.notopen = nil;
35 end 35 end
36 function stream_callbacks.streamclosed() 36 function stream_callbacks.streamclosed()
37 end 37 end
38 function stream_callbacks.error(session, error_name, error_message) 38 function stream_callbacks.error(session, error_name, error_message)