Comparison

plugins/mod_c2s.lua @ 9490:6e4fbd12c11c

mod_c2s: Fix fallback for missing session logger
author Kim Alvefur <zash@zash.se>
date Fri, 12 Oct 2018 02:16:24 +0200
parent 8847:74526c425dec
child 9739:a74d78f79b23
child 10013:62d8689beafb
comparison
equal deleted inserted replaced
9489:09b873ac7eb8 9490:6e4fbd12c11c
69 text = "The 'to' attribute must remain the same across stream restarts" }; 69 text = "The 'to' attribute must remain the same across stream restarts" };
70 return; 70 return;
71 end 71 end
72 session.version = tonumber(attr.version) or 0; 72 session.version = tonumber(attr.version) or 0;
73 session.streamid = uuid_generate(); 73 session.streamid = uuid_generate();
74 (session.log or session)("debug", "Client sent opening <stream:stream> to %s", session.host); 74 (session.log or log)("debug", "Client sent opening <stream:stream> to %s", session.host);
75 75
76 if not hosts[session.host] or not hosts[session.host].modules.c2s then 76 if not hosts[session.host] or not hosts[session.host].modules.c2s then
77 -- We don't serve this host... 77 -- We don't serve this host...
78 session:close{ condition = "host-unknown", text = "This server does not serve "..tostring(session.host)}; 78 session:close{ condition = "host-unknown", text = "This server does not serve "..tostring(session.host)};
79 return; 79 return;