s2smanager: Improve log message on missing to/from in stream header

Tue, 06 Oct 2009 11:02:33 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Tue, 06 Oct 2009 11:02:33 +0100
changeset 1928
d11f07ca0b75
parent 1927
c3384860e23f
child 1929
b8e6764ffefd

s2smanager: Improve log message on missing to/from in stream header

core/s2smanager.lua file | annotate | diff | comparison | revisions
--- 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

mercurial