mod_s2s/s2sout.lib: Use %s to insert strings into log messages instead of concatenation
authorMatthew Wild <mwild1@gmail.com>
Mon, 23 Jul 2012 13:29:33 +0100
changeset 4987 d37f2abac72c
parent 4986 9da430b69f13
child 4988 29bdf68ad142
mod_s2s/s2sout.lib: Use %s to insert strings into log messages instead of concatenation
plugins/mod_s2s/s2sout.lib.lua
--- a/plugins/mod_s2s/s2sout.lib.lua	Mon Jul 23 12:56:47 2012 +0100
+++ b/plugins/mod_s2s/s2sout.lib.lua	Mon Jul 23 13:29:33 2012 +0100
@@ -95,14 +95,14 @@
 			handle = nil;
 			host_session.connecting = nil;
 			if answer then
-				log("debug", to_host.." has SRV records, handling...");
+				log("debug", "%s has SRV records, handling...", to_host);
 				local srv_hosts = {};
 				host_session.srv_hosts = srv_hosts;
 				for _, record in ipairs(answer) do
 					t_insert(srv_hosts, record.srv);
 				end
 				if #srv_hosts == 1 and srv_hosts[1].target == "." then
-					log("debug", to_host.." does not provide a XMPP service");
+					log("debug", "%s does not provide a XMPP service", to_host);
 					s2s_destroy_session(host_session, err); -- Nothing to see here
 					return;
 				end
@@ -115,7 +115,7 @@
 					log("debug", "Best record found, will connect to %s:%d", connect_host, connect_port);
 				end
 			else
-				log("debug", to_host.." has no SRV records, falling back to A/AAAA");
+				log("debug", "%s has no SRV records, falling back to A/AAAA", to_host);
 			end
 			-- Try with SRV, or just the plain hostname if no SRV
 			local ok, err = s2sout.try_connect(host_session, connect_host, connect_port);