Diff

plugins/mod_s2s/s2sout.lib.lua @ 5394:3d1de30fefec

Merge 0.9->trunk
author Matthew Wild <mwild1@gmail.com>
date Thu, 28 Mar 2013 12:17:15 +0000
parent 5388:f833d2188c16
child 5552:40e7a6cf15ff
line wrap: on
line diff
--- a/plugins/mod_s2s/s2sout.lib.lua	Thu Mar 28 12:49:19 2013 +0100
+++ b/plugins/mod_s2s/s2sout.lib.lua	Thu Mar 28 12:17:15 2013 +0000
@@ -90,7 +90,7 @@
 			host_session.connecting = nil;
 			if answer and #answer > 0 then
 				log("debug", "%s has SRV records, handling...", to_host);
-				local srv_hosts = {};
+				local srv_hosts = { answer = answer };
 				host_session.srv_hosts = srv_hosts;
 				for _, record in ipairs(answer) do
 					t_insert(srv_hosts, record.srv);
@@ -271,6 +271,10 @@
 	
 	local from_host, to_host = host_session.from_host, host_session.to_host;
 	
+	-- Reset secure flag in case this is another
+	-- connection attempt after a failed STARTTLS
+	host_session.secure = nil;
+
 	local conn, handler;
 	if connect_host.proto == "IPv4" then
 		conn, handler = socket.tcp();