Software /
code /
prosody
Comparison
core/xmlhandlers.lua @ 20:6885fd2cf51f
Remove some debugging messages
Connection now closed on error
Removed version='1.0' to keep it working with non-SASL
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Tue, 26 Aug 2008 16:57:00 +0100 |
parent | 7:dcc5ac721c20 |
child | 31:aaccbf07849b |
comparison
equal
deleted
inserted
replaced
19:65622bf34afc | 20:6885fd2cf51f |
---|---|
40 session.host = attr.to or error("Client failed to specify destination hostname"); | 40 session.host = attr.to or error("Client failed to specify destination hostname"); |
41 session.version = attr.version or 0; | 41 session.version = attr.version or 0; |
42 session.streamid = m_random(1000000, 99999999); | 42 session.streamid = m_random(1000000, 99999999); |
43 print(session, session.host, "Client opened stream"); | 43 print(session, session.host, "Client opened stream"); |
44 send("<?xml version='1.0'?>"); | 44 send("<?xml version='1.0'?>"); |
45 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)); | 45 send(format("<stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='%s' from='%s'>", session.streamid, session.host)); |
46 --send("<stream:features>"); | 46 --send("<stream:features>"); |
47 --send("<mechanism>PLAIN</mechanism>"); | 47 --send("<mechanism>PLAIN</mechanism>"); |
48 --send [[<register xmlns="http://jabber.org/features/iq-register"/> ]] | 48 --send [[<register xmlns="http://jabber.org/features/iq-register"/> ]] |
49 --send("</stream:features>"); | 49 --send("</stream:features>"); |
50 log("info", "core", "Stream opened successfully"); | 50 log("info", "core", "Stream opened successfully"); |