s2smanager: Move 'sending' debug log message so that it sees the pre-filtered stanzas

Thu, 10 Jun 2010 02:07:48 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Thu, 10 Jun 2010 02:07:48 +0100
changeset 3224
9dd54a708523
parent 3223
ee2dabe699c9
child 3226
69e920d7c968

s2smanager: Move 'sending' debug log message so that it sees the pre-filtered stanzas

core/s2smanager.lua file | annotate | diff | comparison | revisions
--- a/core/s2smanager.lua	Thu Jun 10 01:55:32 2010 +0100
+++ b/core/s2smanager.lua	Thu Jun 10 02:07:48 2010 +0100
@@ -140,13 +140,13 @@
 	session.log = log;
 	local filter = initialize_filters(session);
 	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, t);
 			end
 		end

mercurial