# HG changeset patch # User Matthew Wild # Date 1240453715 -3600 # Node ID 9552c08241aff176eba85ca04e9c84d3c2144e7c # Parent 41a0c76127f4835dbe1ed60b0bafa1cb3df0fe0a# Parent c476bceaf2db4e55fd57dbe3724e9f4b9ef35d51 Merge with 0.4 branch diff -r 41a0c76127f4 -r 9552c08241af core/loggingmanager.lua --- a/core/loggingmanager.lua Thu Apr 23 02:48:22 2009 +0500 +++ b/core/loggingmanager.lua Thu Apr 23 03:28:35 2009 +0100 @@ -13,6 +13,8 @@ local logger = require "util.logger"; +_G.log = logger.init("general"); + module "loggingmanager" -- The log config used if none specified in the config file diff -r 41a0c76127f4 -r 9552c08241af plugins/mod_bosh.lua --- a/plugins/mod_bosh.lua Thu Apr 23 02:48:22 2009 +0500 +++ b/plugins/mod_bosh.lua Thu Apr 23 03:28:35 2009 +0100 @@ -103,7 +103,7 @@ local function bosh_reset_stream(session) session.notopen = true; end -local session_close_reply = { headers = default_headers, body = st.stanza("body", { xmlns = xmlns_bosh, type = "terminate" }) }; +local session_close_reply = { headers = default_headers, body = st.stanza("body", { xmlns = xmlns_bosh, type = "terminate" }), attr = {} }; local function bosh_close_stream(session, reason) (session.log or log)("info", "BOSH client disconnected"); session_close_reply.attr.condition = reason; @@ -126,6 +126,7 @@ -- TODO: Sanity checks here (rid, to, known host, etc.) if not hosts[attr.to] then -- Unknown host + log("debug", "BOSH client tried to connect to unknown host: %s", tostring(attr.to)); session_close_reply.attr.condition = "host-unknown"; request:send{ headers = default_headers, body = tostring(session_close_reply) }; request.notopen = nil @@ -180,7 +181,7 @@ --xmpp:version='1.0' xmlns:xmpp='urn:xmpp:xbosh' local response = st.stanza("body", { xmlns = xmlns_bosh, inactivity = tostring(BOSH_DEFAULT_INACTIVITY), polling = tostring(BOSH_DEFAULT_POLLING), requests = tostring(BOSH_DEFAULT_REQUESTS), hold = tostring(session.bosh_hold), maxpause = "120", - sid = sid, ver = '1.6', from = session.host, secure = 'true', ["xmpp:version"] = "1.0", + sid = sid, authid = sid, ver = '1.6', from = session.host, secure = 'true', ["xmpp:version"] = "1.0", ["xmlns:xmpp"] = "urn:xmpp:xbosh", ["xmlns:stream"] = "http://etherx.jabber.org/streams" }):add_child(features); request:send{ headers = default_headers, body = tostring(response) }; diff -r 41a0c76127f4 -r 9552c08241af plugins/mod_posix.lua --- a/plugins/mod_posix.lua Thu Apr 23 02:48:22 2009 +0500 +++ b/plugins/mod_posix.lua Thu Apr 23 03:28:35 2009 +0100 @@ -43,7 +43,6 @@ local syslog_opened function syslog_sink_maker(config) if not syslog_opened then - print("OPENING SYSLOOOOOOOOOG"); pposix.syslog_open("prosody"); syslog_opened = true; end