changeset 4015:001c756ead7d

mod_firewall/test: Print replies to stderr instead of crashing
author Kim Alvefur <zash@zash.se>
date Sun, 10 May 2020 09:03:16 +0200
parents 1b68954a743a
children b872f111b7af
files mod_firewall/test.lib.lua
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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;