s2smanager: Fix logging for outgoing sessions to also log pre-filtered data

Sun, 13 Jun 2010 17:17:11 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Sun, 13 Jun 2010 17:17:11 +0100
changeset 3265
9374f84c6677
parent 3264
e1c787c6f86e
child 3266
a06120464079

s2smanager: Fix logging for outgoing sessions to also log pre-filtered data

core/s2smanager.lua file | annotate | diff | comparison | revisions
--- a/core/s2smanager.lua	Sun Jun 13 22:06:06 2010 +0500
+++ b/core/s2smanager.lua	Sun Jun 13 17:17:11 2010 +0100
@@ -349,13 +349,13 @@
 	local filter = initialize_filters(host_session);
 	local w, log = conn.write, host_session.log;
 	host_session.sends2s = function (t)
+		log("debug", "sending: %s", (t.top_tag and t:top_tag()) or t:match("^[^>]*>?"));
 		if t.name then
 			t = filter("stanzas/out", t);
 		end
 		if t then
 			t = filter("bytes/out", tostring(t));
 			if t then
-				log("debug", "sending: %s", (t.top_tag and t:top_tag()) or t:match("^[^>]*>?"));
 				return w(conn, tostring(t));
 			end
 		end

mercurial