s2smanager: Use s2smanager log() if session doesn't have a logger (thanks Flo)

Fri, 19 Feb 2010 03:30:27 +0000

author
Matthew Wild <mwild1@gmail.com>
date
Fri, 19 Feb 2010 03:30:27 +0000
changeset 2676
4516888fc42d
parent 2675
ab643a77da2d
child 2677
467568f1117d
child 2681
b8d3b185b676

s2smanager: Use s2smanager log() if session doesn't have a logger (thanks Flo)

core/s2smanager.lua file | annotate | diff | comparison | revisions
--- a/core/s2smanager.lua	Fri Feb 19 03:27:18 2010 +0000
+++ b/core/s2smanager.lua	Fri Feb 19 03:30:27 2010 +0000
@@ -301,7 +301,7 @@
 end
 
 function make_connect(host_session, connect_host, connect_port)
-	host_session.log("info", "Beginning new connection attempt to %s (%s:%d)", host_session.to_host, connect_host, connect_port);
+	(host_session.log or log)("info", "Beginning new connection attempt to %s (%s:%d)", host_session.to_host, connect_host, connect_port);
 	-- Ok, we're going to try to connect
 	
 	local from_host, to_host = host_session.from_host, host_session.to_host;

mercurial