diff options
author | Matthew Wild <mwild1@gmail.com> | 2009-04-23 03:28:35 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2009-04-23 03:28:35 +0100 |
commit | a7d5181dfbb5f6b2979645ac802cd1a098282d31 (patch) | |
tree | 5295ac0bda14553f32a824755b29ee5a47517c3e | |
parent | 2914bea9542be6de2abfa04a9f31f383ef7adf74 (diff) | |
parent | 28ae0dd2a96bd440bc3b5d2a1b93cb908d3fea89 (diff) | |
download | prosody-a7d5181dfbb5f6b2979645ac802cd1a098282d31.tar.gz prosody-a7d5181dfbb5f6b2979645ac802cd1a098282d31.zip |
Merge with 0.4 branch
-rw-r--r-- | core/loggingmanager.lua | 2 | ||||
-rw-r--r-- | plugins/mod_bosh.lua | 5 | ||||
-rw-r--r-- | plugins/mod_posix.lua | 1 |
3 files changed, 5 insertions, 3 deletions
diff --git a/core/loggingmanager.lua b/core/loggingmanager.lua index 36f83861..298e4c45 100644 --- a/core/loggingmanager.lua +++ b/core/loggingmanager.lua @@ -13,6 +13,8 @@ local config = require "core.configmanager"; local logger = require "util.logger"; +_G.log = logger.init("general"); + module "loggingmanager" -- The log config used if none specified in the config file diff --git a/plugins/mod_bosh.lua b/plugins/mod_bosh.lua index 6f61bb8d..653af8bb 100644 --- a/plugins/mod_bosh.lua +++ b/plugins/mod_bosh.lua @@ -103,7 +103,7 @@ end 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 @@ function stream_callbacks.streamopened(request, attr) -- 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 @@ function stream_callbacks.streamopened(request, attr) --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 --git a/plugins/mod_posix.lua b/plugins/mod_posix.lua index 87113aac..b1c7e01b 100644 --- a/plugins/mod_posix.lua +++ b/plugins/mod_posix.lua @@ -43,7 +43,6 @@ end local syslog_opened function syslog_sink_maker(config) if not syslog_opened then - print("OPENING SYSLOOOOOOOOOG"); pposix.syslog_open("prosody"); syslog_opened = true; end |