mod_firewall/test: Print replies to stderr instead of crashing
authorKim Alvefur <zash@zash.se>
Sun, 10 May 2020 09:03:16 +0200
changeset 4019 001c756ead7d
parent 4018 1b68954a743a
child 4020 b872f111b7af
mod_firewall/test: Print replies to stderr instead of crashing
mod_firewall/test.lib.lua
--- a/mod_firewall/test.lib.lua	Sat May 09 21:14:59 2020 +0200
+++ b/mod_firewall/test.lib.lua	Sun May 10 09:03:16 2020 +0200
@@ -49,6 +49,9 @@
 	end
 
 	local session = { notopen = true };
+	function session.send(stanza)
+		stderr("Reply:", "\n"..tostring(stanza).."\n");
+	end
 	local stream = xmppstream.new(session, stream_callbacks);
 	stream:feed("<stream:stream xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client'>");
 	local line_count = 0;