Comparison

core/sessionmanager.lua @ 1452:0ae8787e4e7d

Merged with trunk
author Waqas Hussain <waqas20@gmail.com>
date Thu, 02 Jul 2009 00:47:21 +0500
parent 1450:c1c7b27b983b
child 1469:9f2b6e2bc498
comparison
equal deleted inserted replaced
1451:cc0aa9470775 1452:0ae8787e4e7d
163 session.version = tonumber(attr.version) or 0; 163 session.version = tonumber(attr.version) or 0;
164 session.streamid = m_random(1000000, 99999999); 164 session.streamid = m_random(1000000, 99999999);
165 (session.log or session)("debug", "Client sent opening <stream:stream> to %s", session.host); 165 (session.log or session)("debug", "Client sent opening <stream:stream> to %s", session.host);
166 166
167 send("<?xml version='1.0'?>"); 167 send("<?xml version='1.0'?>");
168 send(format("<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='%s' from='%s' version='1.0'>", session.streamid, session.host)); 168 send(format("<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='%s' from='%s' version='1.0' xml:lang='en'>", session.streamid, session.host));
169 169
170 if not hosts[session.host] then 170 if not hosts[session.host] then
171 -- We don't serve this host... 171 -- We don't serve this host...
172 session:close{ condition = "host-unknown", text = "This server does not serve "..tostring(session.host)}; 172 session:close{ condition = "host-unknown", text = "This server does not serve "..tostring(session.host)};
173 return; 173 return;