Comparison

plugins/mod_bosh.lua @ 1048:45fc590539cd

mod_bosh: Add log message for clients connecting to unknown host
author Matthew Wild <mwild1@gmail.com>
date Thu, 23 Apr 2009 03:25:48 +0100
parent 1047:8c2d88cda1dd
child 1049:c476bceaf2db
comparison
equal deleted inserted replaced
1047:8c2d88cda1dd 1048:45fc590539cd
123 request.notopen = nil; -- Signals that we accept this opening tag 123 request.notopen = nil; -- Signals that we accept this opening tag
124 124
125 -- TODO: Sanity checks here (rid, to, known host, etc.) 125 -- TODO: Sanity checks here (rid, to, known host, etc.)
126 if not hosts[attr.to] then 126 if not hosts[attr.to] then
127 -- Unknown host 127 -- Unknown host
128 log("debug", "BOSH client tried to connect to unknown host: %s", tostring(attr.to));
128 session_close_reply.attr.condition = "host-unknown"; 129 session_close_reply.attr.condition = "host-unknown";
129 request:send{ headers = default_headers, body = tostring(session_close_reply) }; 130 request:send{ headers = default_headers, body = tostring(session_close_reply) };
130 request.notopen = nil 131 request.notopen = nil
131 return; 132 return;
132 end 133 end