Comparison

core/s2smanager.lua @ 2134:9044e7cfefc2

s2smanager: Fix syntax error introduced in merge
author Matthew Wild <mwild1@gmail.com>
date Sun, 22 Nov 2009 04:53:02 +0000
parent 2133:5c1758ccf8b9
child 2166:fb01f0906564
comparison
equal deleted inserted replaced
2133:5c1758ccf8b9 2134:9044e7cfefc2
126 getmetatable(session.trace).__gc = function () open_sessions = open_sessions - 1; end; 126 getmetatable(session.trace).__gc = function () open_sessions = open_sessions - 1; end;
127 end 127 end
128 open_sessions = open_sessions + 1; 128 open_sessions = open_sessions + 1;
129 local w, log = conn.write, logger_init("s2sin"..tostring(conn):match("[a-f0-9]+$")); 129 local w, log = conn.write, logger_init("s2sin"..tostring(conn):match("[a-f0-9]+$"));
130 session.log = log; 130 session.log = log;
131 session.sends2s = function (t) log("debug", "sending: %s", (t.top_tag and t:top_tag()) or t:match("^([^>]*>?)"); w(conn, tostring(t)); end 131 session.sends2s = function (t) log("debug", "sending: %s", t.top_tag and t:top_tag() or t:match("^([^>]*>?)")); w(conn, tostring(t)); end
132 incoming_s2s[session] = true; 132 incoming_s2s[session] = true;
133 add_task(connect_timeout, function () 133 add_task(connect_timeout, function ()
134 if session.conn ~= conn or 134 if session.conn ~= conn or
135 session.type == "s2sin" then 135 session.type == "s2sin" then
136 return; -- Ok, we're connect[ed|ing] 136 return; -- Ok, we're connect[ed|ing]