Comparison

plugins/mod_c2s.lua @ 6279:16d5b55c8d8d

mod_c2s: Fix traceback if c2s stream sent to component
author Kim Alvefur <zash@zash.se>
date Sat, 10 May 2014 02:12:51 +0200
parent 5757:b5ba004beb0a
child 6284:b49540983320
child 6364:4e93e8768c36
comparison
equal deleted inserted replaced
6166:46cb87d531a7 6279:16d5b55c8d8d
48 end 48 end
49 session.version = tonumber(attr.version) or 0; 49 session.version = tonumber(attr.version) or 0;
50 session.streamid = uuid_generate(); 50 session.streamid = uuid_generate();
51 (session.log or session)("debug", "Client sent opening <stream:stream> to %s", session.host); 51 (session.log or session)("debug", "Client sent opening <stream:stream> to %s", session.host);
52 52
53 if not hosts[session.host] then 53 if not hosts[session.host] or not hosts[session.host].users then
54 -- We don't serve this host... 54 -- We don't serve this host...
55 session:close{ condition = "host-unknown", text = "This server does not serve "..tostring(session.host)}; 55 session:close{ condition = "host-unknown", text = "This server does not serve "..tostring(session.host)};
56 return; 56 return;
57 end 57 end
58 58