Comparison

core/s2smanager.lua @ 1928:d11f07ca0b75

s2smanager: Improve log message on missing to/from in stream header
author Matthew Wild <mwild1@gmail.com>
date Tue, 06 Oct 2009 11:02:33 +0100
parent 1909:84027581c995
child 1930:92b78dd346ca
comparison
equal deleted inserted replaced
1927:c3384860e23f 1928:d11f07ca0b75
342 if session.secure == false then 342 if session.secure == false then
343 session.secure = true; 343 session.secure = true;
344 end 344 end
345 345
346 if session.version >= 1.0 and not (attr.to and attr.from) then 346 if session.version >= 1.0 and not (attr.to and attr.from) then
347 log("warn", (session.to_host or "(unknown)").." failed to specify 'to' or 'from' hostname as per RFC"); 347
348 (session.log or log)("warn", "Remote of stream "..(session.from_host or "(unknown)").."->"..(session.to_host or "(unknown)")
349 .." failed to specify to (%s) and/or from (%s) hostname as per RFC", tostring(attr.to), tostring(attr.from));
348 end 350 end
349 351
350 if session.direction == "incoming" then 352 if session.direction == "incoming" then
351 -- Send a reply stream header 353 -- Send a reply stream header
352 session.to_host = attr.to and nameprep(attr.to); 354 session.to_host = attr.to and nameprep(attr.to);