Comparison

core/s2smanager.lua @ 9934:69982753fe4b

core.s2smanager: Rename variable to be same in two functions
author Kim Alvefur <zash@zash.se>
date Fri, 29 Mar 2019 22:45:54 +0100
parent 9787:6625efab91e2
child 9935:3dfd5f22e3c6
comparison
equal deleted inserted replaced
9933:aac4c55721f9 9934:69982753fe4b
24 24
25 local _ENV = nil; 25 local _ENV = nil;
26 -- luacheck: std none 26 -- luacheck: std none
27 27
28 local function new_incoming(conn) 28 local function new_incoming(conn)
29 local session = { conn = conn, type = "s2sin_unauthed", direction = "incoming", hosts = {} }; 29 local host_session = { conn = conn, type = "s2sin_unauthed", direction = "incoming", hosts = {} };
30 session.log = logger_init("s2sin"..tostring(session):match("[a-f0-9]+$")); 30 host_session.log = logger_init("s2sin"..tostring(host_session):match("[a-f0-9]+$"));
31 incoming_s2s[session] = true; 31 incoming_s2s[host_session] = true;
32 return session; 32 return host_session;
33 end 33 end
34 34
35 local function new_outgoing(from_host, to_host) 35 local function new_outgoing(from_host, to_host)
36 local host_session = { to_host = to_host, from_host = from_host, host = from_host, 36 local host_session = { to_host = to_host, from_host = from_host, host = from_host,
37 notopen = true, type = "s2sout_unauthed", direction = "outgoing" }; 37 notopen = true, type = "s2sout_unauthed", direction = "outgoing" };