137 function xmppserver.status(conn, status) |
137 function xmppserver.status(conn, status) |
138 if status == "ssl-handshake-complete" then |
138 if status == "ssl-handshake-complete" then |
139 local session = sessions[conn]; |
139 local session = sessions[conn]; |
140 if session and session.direction == "outgoing" then |
140 if session and session.direction == "outgoing" then |
141 local format, to_host, from_host = string.format, session.to_host, session.from_host; |
141 local format, to_host, from_host = string.format, session.to_host, session.from_host; |
142 session.log("warn", "Sending stream header..."); |
142 session.log("debug", "Sending stream header..."); |
143 session.sends2s(format([[<stream:stream xmlns='jabber:server' xmlns:db='jabber:server:dialback' xmlns:stream='http://etherx.jabber.org/streams' from='%s' to='%s' version='1.0'>]], from_host, to_host)); |
143 session.sends2s(format([[<stream:stream xmlns='jabber:server' xmlns:db='jabber:server:dialback' xmlns:stream='http://etherx.jabber.org/streams' from='%s' to='%s' version='1.0'>]], from_host, to_host)); |
144 end |
144 end |
145 end |
145 end |
146 end |
146 end |
147 |
147 |