# HG changeset patch
# User Matthew Wild <mwild1@gmail.com>
# Date 1254823353 -3600
# Node ID d11f07ca0b754e27f9f340001768d30baa982838
# Parent  c3384860e23f10c09495a0332cacf0bbdd0c3510
s2smanager: Improve log message on missing to/from in stream header

diff -r c3384860e23f -r d11f07ca0b75 core/s2smanager.lua
--- a/core/s2smanager.lua	Tue Oct 06 10:42:53 2009 +0100
+++ b/core/s2smanager.lua	Tue Oct 06 11:02:33 2009 +0100
@@ -344,7 +344,9 @@
 	end
 	
 	if session.version >= 1.0 and not (attr.to and attr.from) then
-		log("warn", (session.to_host or "(unknown)").." failed to specify 'to' or 'from' hostname as per RFC");
+		
+		(session.log or log)("warn", "Remote of stream "..(session.from_host or "(unknown)").."->"..(session.to_host or "(unknown)")
+			.." failed to specify to (%s) and/or from (%s) hostname as per RFC", tostring(attr.to), tostring(attr.from));
 	end
 	
 	if session.direction == "incoming" then